home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
system
/
obskit15.zip
/
OBSKIT.DOC
< prev
next >
Wrap
Text File
|
1992-01-11
|
208KB
|
5,606 lines
Obs Toolkit (TM)
User Manual
Version 1.5
A DOS utility toolkit
for
Command Line and Batch users
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Contrails, Inc.
P.O. Box 2759
Lompoc, CA 93438-2759
CIS 71121,2426
Program created by
Keith E. Robbins
Copyright (c) 1991 1992
by Contrails, Inc.
All rights reserved
Obs Toolkit 1.5 Dedication
Dad
You helped so very much!
-ii- Obs Toolkit 1.5 Contents
Table of Contents
-------------------------------------------------------------
SHAREWARE...................................................1
Distribution..............................................1
Contacting the author.....................................2
REGISTRATION................................................3
Refund policy.............................................4
ASP Ombudsman.............................................4
INTRODUCTION................................................5
SYSTEM REQUIREMENTS.........................................8
SYSTEM RECOMMENDATIONS......................................8
Disk caching software.....................................8
286 or better.............................................8
RAM disks.................................................9
Hard disk drive...........................................9
INSTALLATION...............................................10
Quick installation.......................................10
User installation........................................11
Bad command or file name.................................12
Installing on a RAM disk.................................14
Batch files..............................................14
GETTING STARTED............................................16
WildSpecs................................................17
SmartPaths...............................................18
Date & time..............................................19
Quoting strings..........................................20
Line editor..............................................20
ErrorLevels..............................................21
Options..................................................21
Reading the usage........................................22
Press any key............................................22
TOOLS:
ObsRes, ReRes & DirStack.................................23
Alias....................................................28
DirSize..................................................36
EnvEdit..................................................39
FileDump.................................................45
ListFiles................................................51
Locate...................................................61
MultiFile................................................64
ObsCD....................................................74
APPENDICES:
A: Quick Reference.......................................81
B: Bug report............................................87
C: Survey form...........................................88
D: Registration form.....................................89
-iii- Obs Toolkit 1.5 Copyrights and Trademarks
Copyrights
----------
Alias Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
DirSize Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
DirStack Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
EnvEdit Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
FileDump Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
ListFiles Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
Locate Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
MultiFile Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
ObsCD Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
ObsRes Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
ReRes Copyright (c) 1991 1992, Contrails, Inc., All rights reserved.
Trademarks
----------
Obs Toolkit is a trademark of Contrails, Inc.
MS-DOS and Windows are trademarks of Microsoft Corporation.
Borland C++, Turbo Assembler, Turbo Debugger, Turbo Profiler, and Turbo
Pascal are all trademarks of Borland International Inc.
All Borland products are registered trademarks of Borland International,
Inc.
DESQview is a trademark of Quarterdeck Office Systems.
PC Magazine is a registered trademark of Ziff Communications Co.
CompuServe Magazine is a registered trademark of CompuServe Incorporated.
PC-Kwik is a trademark of Multisoft corporation.
PC-Tools is a trademark of Central Point Software Inc.
Spontaneous Assembly is a trademark of Acclaim Technologies Inc.
UNIX is a trademark of AT&T Bell Laboratories.
Macintosh is a trademark of Apple Computer.
The ZIP file was produced by PKZIP 1.1. PKZIP is a registered trademark
of PKWARE Inc. The ZIP file format is public domain.
The self extracting file was produced by LHARC 2.13. LHARC is a
copyrighted product; its copyright is owned by Haruyasu Yoshizaki.
All other brand and product names are trademarks or registered trademarks
of their respective holders.
-iv- Obs Toolkit 1.5 Copyrights and Trademarks
Tools used while developing Obs Toolkit
---------------------------------------
This Toolkit was produced using the Borland C++ compiler, and Turbo
Assembler. The product was Debugged, Profiled and optimized using
Borland's Turbo Debugger, and Turbo Profiler. Basetwo developments
Spontaneous Assembly provided the routines to access the environment
blocks.
The Shareware documentation was prepared using the MicroStar editor
supplied in Borland's Turbo Pascal Editor Toolbox.
Mark and Release were used extensively during testing of ObsRes and
ReRes. Mark and Release are available on CompuServe in a file called
TSRCOM.ARC. TSRCOM was produced by TurboPower Software.
Apologies
---------
We apologize for any spelling or grammatical errors that may be in this
document. The real document is a definite cut above. The word processor
used to prepare the formal document is much better than the text editor
used to prepare this document. Even the inconsistencies of format and
style have been addressed.
This document has been prepared for the lowest common denominator of
printer. The only thing that this document requires is a page size of at
least 80 columns by 60 lines and the ability to process a Form-Feed.
The printed manual (which you receive for registering) is not a straight
copy of this document. The printed manual makes extensive use of fonts &
bolding to draw special attention to key topics. We put the same quality
into the printed manual as we did into the Toolkit.
-v- Obs Toolkit 1.5 Disclaimer of warranty
DISCLAIMER OF WARRANTY
THIS SOFTWARE AND MANUAL ARE SOLD "AS IS" AND WITHOUT
WARRANTIES INCLUDING ANY IMPLIED WARRANTY OF
MERCHANTABILITY OR IMPLIED WARRANTY OF FITNESS FOR A
PARTICULAR PURPOSE. NO WARRANTY AS TO PERFORMANCE OR
MERCHANTABILITY OR WARRANTY OF FITNESS FOR A PARTICULAR
PURPOSE IS OFFERED.
GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON
IT. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE
ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PLACED, THE
USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. THE
AUTHOR MAY NOT BE HELD LIABLE FOR ANY USE, MISUSE, OR
INABILITY TO USE THIS SOFTWARE. ANY LIABILITY OF THE SELLER
WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR
REFUND OF PURCHASE PRICE.
If the software doesn't work on your platform, then let us
know and we will attempt to fix it. Use the attached bug
form in appendix B.
-vi- Obs Toolkit 1.5 Shareware
Shareware
---------
Obs Toolkit is NOT public domain software or FreeWare. Obs Toolkit is
protected by copyright and all such rights are owned by Contrails, Inc.
Shareware is a software distribution method. By evaluating software
distributed as Shareware, you should find software that meets your needs
yet doesn't clean out your wallet. Shareware distribution permits you to
try the software before you buy; that way you know exactly what you are
getting. The cost of Shareware is lower because you do the marketing for
the developer.
If you like the software then please share it with a few friends. They
will be happy, we will be happy, and you will too. Everybody wins. If you
continue to use the Shareware, after the evaluation period has elapsed,
you are required to register. If you do not continue to use the software,
then don't register. Nobody ever has to pay for software that they won't
use if they look into Shareware first.
Obs Toolkit is distributed through Shareware marketing so that you may
evaluate the Toolkit before your purchase. If you decide that Obs Toolkit
is useful, and you want to continue using it, then you must register with
Contrails, Inc. We repeat, so that it is perfectly clear; if you use it,
you must register it.
When your registration is received a registered copy of Obs Toolkit, that
eliminates the random Ob-noxious messages and provides you a printed
manual will be promptly mailed.
The printed manual, Ob-Noxious message elimination, technical support,
peace of mind, and updates at a reduced cost will be the gifts you
receive for registering this Toolkit.
Soon you will be wielding Obs Toolkit like a true master. (Don't forget
to register.)
Distribution
------------
Distribution of Obs Toolkit is limited to the Shareware version.
You are encouraged to distribute copies of Obs Toolkit (Shareware) to the
open public so long as all unmodified files, and this unmodified document
are distributed also. It is recommended that the file OBSKIT.ZIP or
OBSKIT.EXE be distributed. Obs Toolkit is not to be distributed without
the documentation and registration form.
A fee may be charged for the distribution of Obs Toolkit (Shareware), but
the fee must be less than $7. When distributing this Toolkit you should
represent the product as being distributed through Shareware marketing.
Registration with the author is required if any of the software is still
being used after the evaluation period. The product can not be presented
as FREE software.
-1- Obs Toolkit 1.5 Shareware
Distribution of registered versions shall be strictly prohibited.
Contacting the Author
---------------------
The author can be reached via CompuServe:
o CIS 71121,2426 (CompuServe Information Service)
Contrails can be reached via mail, phone, or Fax:
Contrails, Inc. (805) 733-2808 (Voice)
P.O. Box 2759 (805) 733-3066 (Fax)
Lompoc, CA 93438-2759
Random Ob-noxious messages
--------------------------
The random Ob-noxious messages are a feature to remind you that you are
evaluating a product distributed as Shareware.
These messages will go away when you receive your registered version of
Obs Toolkit.
The message appearance is completely random, however the frequency is
just high enough to be a solid reminder without deterring from the
product quality. The goal being, that the more benefit the Toolkit is to
you, the more often that you will see the messages.
The random Ob-noxious messages
o are designed to let you see the Tool in operation as it would appear
if it were registered (this is when the message does not appear).
o provide you with no loss in Toolkit capability. You are evaluating a
complete Toolkit. No corners have been cut or capability disabled.
o are only a minor inconvenience during Toolkit evaluation.
o are going to be a constant reminder that you should register.
Please don't put up with the messages, they only get in your way.
User Obligations
----------------
You may evaluate this product. You may not modify this software or
documentation in any way. You are encouraged to share this software with
others.
This Toolkit took over a year to produce. One man working very hard for a
dream to (hopefully) come true. Shareware is not free. The author worked
early mornings, late evenings, and most weekends to produce software that
you can benefit from. You can be part of the dream come true! If you
continue to use this software, then you must register. It is not an
option, it's an obligation. If you do not register (but continue to use
the Toolkit anyway), then you are telling the author and authors family
(wife and kids) that the money and time spent were not worth it. If you
use it, register it! Your registration is their reward. End of plea!
-2- Obs Toolkit 1.5 Registration
Registration
------------
To register this copy of Obs Toolkit, fill out the order form and mail
with payment to the address specified.
A registration form is included as Appendix D.
Upon receipt of your order, a registered version of Obs Toolkit will be
promptly mailed to you. You will then be entitled to technical support,
and updates at a reduced cost.
Technical support will always available. If after one (1) hour of phone
support you are asking basic questions (answers readily available in the
documentation), then the "free" technical support will be exhausted and
will become an additional cost item. Good questions are always free. Most
questions are good questions.
Individual Use
--------------
Registration is $39.00 plus shipping and handling. Registration includes
a registered version and a printed manual.
Upgrades from version 1.0 are available for $11.00 plus shipping and
handling. Upgrade registration includes a registered version and a
printed manual.
Corporations / Institutions
---------------------------
A license to use Obs Toolkit is required in corporations and
institutions. The license will allow duplication of the Toolkit at a
single site for the number of copies purchased. The cost of the license
is based on the number of machines on which the Toolkit will be running.
The schedule of fees is as follows:
Number of copies Price per copy
---------------- --------------
1 $39.00
2 - 9 28.00
10 - 24 24.00
25 - 49 21.00
50 - 100 19.00
All payments must be in U.S. dollars.
Regardless of the quantity ordered, only one (1) manual, and one disk
containing the registered copy of the Toolkit will be mailed. Upon
receipt, you will be authorized to make as many copies of the Toolkit as
you are licensed. The printed manual may not be reproduced. Additional
printed manuals are $6.00 each.
Site licenses are negotiable.
-3- Obs Toolkit 1.5 Registration
Refund Policy
-------------
Each registration comes with a 30 day, no questions asked, money back
guarantee. In the event of a system incompatibility, the guarantee is
extended to a full 90 days.
Upon receipt of properly returned merchandise, Contrails will refund the
full purchase price of the software less shipping and handling. Contrails
will not accept items returned with insufficient postage or COD charges.
Before you return the Toolkit you must contact Contrails, Inc. for a
Return Authorization number. Returns will not be accepted without one.
You must return the registered disk and manuals in good condition.
ASP Ombudsman
-------------
This program is produced by a member of the Association of Shareware
Professionals (ASP). ASP wants to make sure that the shareware principle
works for you. If you are unable to resolve a shareware-related problem
with an ASP member by contacting the member directly, ASP may be able to
help. The ASP Ombudsman can help you resolve a dispute or problem with an
ASP member, but does not provide technical support for members' products.
Please write to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442-
9427 or send a Compuserve message via CompuServe Mail to ASP Ombudsman
70007,3536"
-4- Obs Toolkit 1.5 Introduction
Introduction
------------
Obs (Aubz not Oh Beez) Toolkit is a DOS command line supplement. Many of
the tools that DOS provides fall short of the capability that is needed
during a normal file management session. File management is an ongoing
activity, and as such, the better the tools the more organized you are,
and the less time you spend managing files.
Obs Toolkit can be used to supplant many of the DOS internal commands
with enhanced command equivalents. Obs Toolkit can be customized to
provide commands such as:
o ALIAS (define your own commands)
o ATTRIB (set and/or clear any DOS attributes)
o CD (fuzzy matching, across disks, push, pop, up)
o COPY (add, update, replace, add & update, archive only)
o DELETE (files, directories with contents)
o DIR (any sort, duplicates, old files, identical contents)
o LOCATE (commands, files, multiple disks)
o MOVE (between directories, across disks, whole directories)
o RENAME (files, directories)
o SET (any environment, editor, long variables, batchable)
o TOUCH (set file date and time to any valid timestamp)
o TREE (with directory sizes, creation dates)
o TYPE (ASCII only, HEX dump, strings, count, multiple files)
Obs Tools come with:
o Enhanced wildcard capabilities
o Multiple '*'s
o Overwrite protection
o Yes to cautions
o Force operations
o Coarse and fine selection criteria
o Time and date
o File size
o File attributes
o User prompt
o Activity monitoring
o Test effects before operation
o Command generation
o Customize command line
o Auto build batch files
o SmartPaths
o Pseudo drives
o Errorlevels
o and a whole lot more
Obs Toolkit contains virtually hundreds of capable commands. Some authors
would distribute the programs individually for about the same price as we
are offering the integrated Toolkit.
-5- Obs Toolkit 1.5 Introduction
Some of the capabilities provided in this package are available
elsewhere, but none come with quite the same flavor. Many of the other
capabilities are fresh ideas and do not exist anywhere.
With this package installed on your computer most other users won't even
notice that anything has changed. Their work will get done quicker,
easier, and faster, but they won't have to learn a thing to start using
the Toolkit.
Using Obs Toolkit in batch files will provide you with new found control
capabilities. You will be able to modify the users environment (disk,
directory, environment variables, aliases, etc..)., launch an application
(if applicable), and then restore the complete environment to what it was
before the batch file executed; the user will be so pleased!
Flagships
---------
Since this is a Toolkit of many diverse, yet integrated tools, you might
ask what the flagship of the Toolkit may be. Tough question. It would be
ObsCD; the tool that can get you to any directory with ease; or is it
EnvEdit, the tool that lets you edit your PATH statement.
Are these better than ListFiles? ListFiles can present you orderly lists
of files, sorted to your specifications. No, it must be MultiFile! Once
you have the list of files, and you are located in the correct directory,
MultiFile will take the same command line given to ListFiles and
manipulate them. So there we have it.
No WAIT! ObsRes made it all possible by providing command line
substitution, and holding the DirStack; what are we driving at here?
Obs Toolkit is an integrated collection of tools. There is NO flagship.
Each tool has a purpose and works with the others to give you a robust
environment from which to compute. The flagship is the Toolkit!
Under the Hood
--------------
Obs Toolkit is very well behaved. Its use of undocumented DOS has been
kept to a minimum and it never performs disk writes directly, it always
uses DOS.
The undocumented features of DOS used by Obs Toolkit are nearly standard
today and should present no problems whatsoever. The undocumented
features used are:
o EnvEdit - technique for locating environment blocks
o DirSize - calculation for disk space used by a sub-directory
o MultiFile - determination of SUBSTituted / JOINed drives
That's it. This Toolkit should be safe on all platforms, however we do
recommend giving each tool a thorough run through just to be sure.
-6- Obs Toolkit 1.5 Introduction
Most DOS utilities can not boast this high level of compatibility. They
are more concerned with performance than safety and compatibility. The
performance of Obs Toolkit has been achieved through careful selection of
the algorithms which minimize redundant and unnecessary operations thus
saving time.
Some performance areas of the Toolkit could be significantly enhanced by
using additional undocumented DOS features or writing directly to disk.
But we ask you now, would you like an activity to take a few more
milli-seconds, or would you like to hunt down the Lost Clusters and
repair the damaged file?
The best operator on files is DOS. Obs Toolkit uses DOS. Obs Toolkit is
proud to use DOS!
It's OK to want more
--------------------
The reason COMMAND.COM has such primitive commands resident, as opposed
to a shell that has all commands external, is that back in the olden days
(circa 1981), the PC was an infantile machine. Sure it was a lot of power
(compared to a calculator) but it was almost a joke by today's standards.
The designers of DOS's command interpreter were faced with a real
challenge. With only a floppy drive as standard equipment, were users
willing to wait for external commands to be found and launched? Would
users be willing to place the disk back in the drive when the commands
were needed. The answer was both YES and NO.
Yes they would have to use external commands, because RAM was limited,
and No they wouldn't because the embedded internal commands did not have
to be embedded at all. The developers split COMMAND.COM into three
pieces. Initialization, resident, and transient.
The transient portion contains the internal commands and gets loaded into
high memory. That way if an application needs the memory, DOS will
allocate away the transient portion of COMMAND.COM.
When resident COMMAND.COM gets control back (COMMAND.COM is really just a
shell), it checks if the transient is O.K. If the transient is corrupted
the resident portion reloads the transient portion back into high memory.
With this technique, DOS provides users with internal commands that have
a low memory overhead. Unfortunately, as the machines evolved,
COMMAND.COM remained much the same. This has not been a problem because
COMMAND.COM is slick. So slick in fact, that many programs are intimately
involved with its normal operations. Replacing COMMAND.COM is a delicate
task and you'll never know if you get all the bugs out.
The problem with COMMAND.COM are those primitive internal commands. They
seem to get you half the way there and then leave you hanging. Sure there
is third party software. Another interface to learn; shell in and out to
get a job done, but you are already in DOS, and you probably like using
DIR for directory and COPY for copy. What can be done?
-7- Obs Toolkit 1.5 Introduction
The only real inconvenience is that COMMAND.COM recognizes its internal
commands before it recognizes anything else. If something were to
translate the users input to invoke different tools it could effectively
enhance the DOS command line.
The solution is Obs Toolkit. A set of external commands that can hide the
internal DOS commands and consistently go that extra mile. By using
aliased commands, the Toolkit is able to hide the COMMAND.COM internal
commands with superior Toolkit commands; and with careful planning (and a
lot of testing we might add), you shouldn't even notice that they're
there. Some have a little twist but it's more capability, increased
convenience or a safety cushion. In the case of the safety cushion, you
can always inhibit it.
System Requirements
-------------------
o DOS 3.0 or higher.
o 256K memory.
System Recommendations
----------------------
Disk caching software
---------------------
Use of Disk caching software such as SMARTDrive, Super-PC Kwik, or
PC-Cache, just to name a few, will significantly reduce repeated access
time to your application programs, and reduce wear and tear on your disk
drive as well.
Disk caching software stores the most recent disk accesses in computer
memory. That way if the computer asks for the same information in
relatively short order, the disk caching software can answer the request
without accessing the disk.
The disk caching software doesn't help the execution of the tools, but it
will speed your access time to them, and to the data that the tools
require. The Toolkit provides its own internal caching.
SMARTDrive is available with MS-DOS versions 4.0+ and with Windows 3.0.
Super PC-Kwik Disk Accelerator is available as a stand alone product from
Multisoft Corporation.
PC-Cache is available with PC-Tools, from Central Point Software Inc.
286 or better
-------------
If you have a 286 or better processor, then go ahead and supplant the DOS
internal commands.
-8- Obs Toolkit 1.5 Introduction
If you are still on the 8088/8086 class of processors, then using the
tools in the native mode and using DOS internal commands is probably the
most efficient way to go. Because some commands like OCD are so
outstanding you might want to install the Toolkit anyway.
If you don't want to replace the DOS internal commands (a little
sentimental maybe) then by all means, still use ObsRes, and install an
Alias dictionary and DirStack. The small amount of memory used is put to
good use and you can define your own commands.
RAM Disks
----------
If you install a RAM disk, then feel free to place the Toolkit on the RAM
disk. This will (naturally) give you the best performance. It makes sense
however (if RAM disk space is limited), to place the most frequently used
commands on the RAM disk, and leave the less used commands on disk. In
this case you may want to further the definition of the OB alias with OB1
and OB2, where OB1 is the disk and OB2 is the RAM drive.
For more information on RAM Disks see Installation/Installing on a RAM
disk.
Hard disk drive
---------------
If you don't have a hard disk drive, RAM disk, or a network where the
tools are easily located, then once again we recommend using the DOS
internal commands for normal activities, and using the Toolkit in native
mode as desired.
-9- Obs Toolkit 1.5 Installation
Installation
------------
Supplied files
--------------
The documentation supplied with Obs Toolkit is:
o OBSKIT.DOC - This file
o REGISTER.DOC - Registration form
o VENDOR.DOC - Distribution notes
o UPDATES.DOC - Changes since version 1.0
o UPGRADE.DOC - Notes for users of version 1.0
o README.TXT - Quick intro / Late breaking news
To install Obs Toolkit onto your machine, add the following files to your
utility directory (these files just need to be visible via DOS's path):
o ALIAS.EXE - Alias, the alias generator
o DIRSTACK.COM - Directory Stack without aliases
o DS.EXE - DirSize, a tree with sizes
o EE.EXE - EnvEdit, a DOS environment editor
o FD.EXE - FileDump, the file viewer
o LF.EXE - ListFiles, the file lister
o LOCATE.EXE - Locate, the executable command and file locator
o MF.EXE - MultiFile, the file manipulator
o OBSRES.COM - Alias translator, dictionary, and directory stack
o OCD.EXE - ObsCD, a super-intelligent Change Directory
o RERES.COM - Re-Resident alias dictionary
The following files are provided as examples on how to customize your
command line interface:
o ALIASES.DOS - This is an alias definition file that supplants the
DOS internal commands with enhanced Toolkit
commands. No additional commands are provided.
o ALIASES.REC - This is an alias definition file filled with
recursive aliases. This file contains most of the
aliases described in this document, using recursive
definitions to optimize performance
o XDOS.CFG - An alias definition file for use with NDOS and 4DOS.
o PCED.CFG - An alias definition file for use with PCED.
Quick installation
------------------
To install the Toolkit quickly:
1) Change to the directory where the Toolkit files are located.
2) Type install at the command line.
INSTALL.BAT will create a file called ALIASES.FIL in the Toolkit
directory, and will MODIFY your AUTOEXEC.BAT (on drive C:) by appending
the following lines:
-10- Obs Toolkit 1.5 Installation
[obs_path]OBSRES
[obs_path]ALIAS /FILE [obs_path]\ALIASES.FIL
In the event that you have a menu program take control of the computer
from the AUTOEXEC.BAT, then you will have to move the above two lines
from the bottom of the file.
It is also recommended that you modify your PATH statement to include the
Toolkit directory. That will enable you to use the Toolkit commands from
a batch file.
User installation
-----------------
Then add the following lines near the end of your AUTOEXEC.BAT file:
OBSRES
ALIAS /FILE [obs_path]\ALIASES.REC
To build the OCD Hot Directory (HotDir) file, just type
C>OCD /READ
Note:
The ALIASES.REC file contains most of the aliases suggested in this
document. This files can be executed either as a DOS command by
renaming it to ALIASES.BAT and entering ALIASES at the command prompt, or
by being processed by the ALIAS utility by typing:
ALIAS /FILE [path]\ALIASES.REC
Processing the aliases via /FILE is quicker than DOS batch files.
The ObsRes DOS aliases are described in the file ALIASES.DOS. The
ObsRes recursive aliases are described in the file ALIASES.REC.
Feel free to customize the installation as you see fit.
Recursive aliases are swapped again and again until no more swaps are
possible or the recursion limit is exceeded.
Define the OB alias
-------------------
The OB alias is used to specify the directory that the tools are
located in. The OB alias is not limited to just Obs Toolkit; its
concept can (should?) be extended to all tools.
OB is defined so that DOS knows where to locate a tool. It resolves to
the exact pathname so that DOS does not have to spend time searching
other directories in the path.
-11- Obs Toolkit 1.5 Installation
OBs purpose is strictly performance optimization. OB is not required
and can be "null defined." The recursive alias definition file supplied
with Obs Toolkit currently has it "null defined." To draft OB into
service you must define it.
Two ways to define OB
---------------------
1) Use an editor to edit the Alias definition file
This technique has the advantage of retaining the comments in the
ALIASES.REC file.
Open the alias definition file in an editor and change the
ALIAS /NULL OB
to
ALIAS /NOSPACE OB drive:\path\
2) Define it with ALIAS, and redirect the file output
These techniques require that ObsRes be installed. It is
recommended that the aliases be previously loaded.
If you are located in the Toolkit directory, you can type
ALIAS /MAKE OB
otherwise define the OB alias by typing:
ALIAS /NOSPACE OB drive:\path\
To save the definition in the alias definition file type
ALIAS > drive:\path\filename.ext
==>> The redirected output will lose any comment and nesting
information in the alias definition file.
Note:
Regardless of the technique used be sure to define OB using the
"/NOSPACE" qualifier and include the trailing "\".
If you choose to use the /MAKE option, be sure that you are located
in the Toolkit directory.
Bad command or file name
------------------------
If you are configuring a system with recursive aliases, and the command
line becomes unresponsive "doesn't do anything" or degenerates to "Bad
command or file name", then the commands are being swapped incorrectly.
Use the following procedure to identify and correct the error:
1) Turn the translation echo on by typing .ECHO at the command line.
C>.ECHO
2) Type a simple aliased command (e.g., DIR)
C>DIR
3) Examine the translation
Use 3a if nothing happens when a command is issued at the command
-12- Obs Toolkit 1.5 Installation
line or the machine changes drives.
Use 3b, 3c, 3d, or 3e if you receive "Bad command or file name"
when using the aliased commands.
3a) The command looks like "C:\path\ LF.EXE"
The culprit is the space between the path and the tool name.
In this case you need to add the /NOSPACE qualifier to the OB
alias definition (place this option before the OB name).
3b) The command looks like "C:\badpath\LF.EXE"
The culprit in this case is that the tools are not located in
the specified directory. In this case, you need to correct the
definition for the OB alias definition.
3c) The command looks like "C:\pathLF.EXE"
The culprit in this case is that the trailing "\" was omitted
in the alias definition. In this case, you need to correct the
definition for the OB alias definition.
3d) The command looks line "OB LF.EXE"
The culprit in this case is 3E or that the OB alias is not
defined. In the latter case you need to define the OB alias
definition to specify the directory that the Toolkit is
located, or define it to be /NULL.
3e) The command looks line "OB LF.EXE"
The culprit in this case is 3d or that recursive aliases are
not selected. In the latter case you need to enable recursive
aliases (ALIAS /RECURSE).
4) Turn the translator off by typing .OFF at the command line.
C>.OFF
5) Change to the directory that the Toolkit is located in.
C>CD \path
Note: This is necessary if the Toolkit is not located in the
current DOS path.
6) Use the ALIAS /EDIT to correct the error.
C>ALIAS /EDIT OB
7) Turn the translator back on by typing .ON at the command line.
C>.ON
8) Turn the translation echo off by typing .NOECHO at the command
line.
C>.NOECHO
9) Save your changes.
-13- Obs Toolkit 1.5 Installation
Installing on a RAM disk
------------------------
Putting Obs Toolkit on a RAM disk can reduce access time to the tools.
There are two primary ways to install the Toolkit.
Full installation
-----------------
A full installation is to copy all the tools to the RAM disk. To
decrease access time even further use recursive aliases, and set the
OB alias to point directly to the RAM disk.
This technique will give you the best overall performance (time
wise) but requires RAM to do so.
Partial installation
--------------------
The partial installation is probably your best bet. Place your most
frequently accessed commands on the RAM disk, and you are home free.
To continue receiving the benefit of the Toolkit's use of recursive
aliases, it would be best to define two OB aliases. One to point to
the RAM disk and the other to point to the hard disk.
Say you wanted to put LF.EXE, MF.EXE, and OCD.EXE on your RAM disk
(G:), and leave all the others in your C:\UTIL directory. Using
recursive aliases you could set up an alias definition file that
looks similar to the following:
REM This example assumes recursive aliases
ALIAS /RECURSE
REM these commands set up the directory pointers
ALIAS /NOSPACE OB1 C:\UTIL\
ALIAS /NOSPACE OB2 G:\
REM these commands point to the RAM disk
ALIAS LF OB2 LF.EXE
ALIAS MF OB2 MF.EXE
ALIAS OCD OB2 OCD.EXE
REM these commands point to the hard disk
ALIAS FD OB1 FD.EXE
ALIAS DS OB1 DS.EXE
...etc...
If, later, you remove the files from the RAM disk, you can simply
redefine OB2 to OB1 to retain instant access to Toolkit commands.
Batch files
-----------
Using Obs Toolkit within batch files is straightforward; in fact it's
downright convenient since it uses standard ErrorLevels for everything.
You must have the Toolkit directory located in your PATH unless you use
fully qualified filenames.
-14- Obs Toolkit 1.5 Installation
For a description of the ErrorLevels see Getting Started/ErrorLevels.
You cannot use aliased commands from within a batch file, you must type
the proper tool name, and supply all of its options.
Note 1:
LOCATE clearly shows the advantages of fully qualified filenames at
the command line (e.g., C:\UTIL\OCD.EXE). This is true in batch files
also. To get maximum batch file performance, use fully qualified
filenames in your batch files also. This is true for all batch file
external commands, not just those in Obs Toolkit.
Note 2:
To conserve precious system memory and obtain the fastest boot
possible, install ObsRes and all your other memory resident programs
before establishing your environment (e.g., path, prompt, etc...).
This yields the smallest environment block possible for the TSR, but
means that you must use a fully qualified filename to launch all
programs (the PATH is not set). Be sure to set the environment
variables the TSR requires before launching the TSR.
Trick:
You can now (safely) use the environment in your batch files. As an
example consider launching a TSR. Many TSRs today still do not
release there environment blocks. Using EnvEdit you can save the
current environment block to a file (EE /SAVE filename.exe), clear it
out of everything but the required entries (EE /CLEAR), launch the
TSR, and then restore the environment from the file (EE /FILE
filename.ext).
Many other variations of this technique are available. If you study
the Toolkit's INSTALL.BAT you will see an example use of EnvEdit to
preserve your environment before maniplulating it. The INSTALL.BAT
returns everything to normal before exiting.
-15- Obs Toolkit 1.5 Getting Started
Getting Started
---------------
Using Obs Toolkit is easy. You can install it now, start working with it,
and then learn more as you go. In a sense you could consider Obs Toolkit
to be a DOS shell, but in reality, it is just a collection of tools
cooperating to get your work done.
Obs Toolkit can be used in two (2) ways. The first way is to place all
the programs in your utility directory (which is in your path), and call
them up when you need them. The second way is to place the programs in
your utility directory, and use Obs Alias generator to replace the DOS
internal commands to invoke Obs tools.
The first way requires you to remember all those options. The second way
embeds the options in the aliased commands. Since only a minimal amount
of memory is used and so much capability gained, go ahead, configure your
system using option 2.
If you consider the Toolkit's use of options to be intimidating, then
think about out what you want to do; invoke the help screen for the
utility (/?); create an Alias for the command (ALIAS cmd tool switches),
and poof, you have just created a brand new command. When you are all
done creating commands (or any time you add / delete commands) just write
the Alias dictionary out to disk so that it is there the next time you
boot your computer.
A quick reference guide is included as Appendix A.
Getting started with Obs Toolkit will take a little getting used to. All
the power is kind of like driving a high performance street mobile. You
already know how to drive, and you have a good idea of what most of the
gauges are, but you're wondering what that "do-hickey" does and why they
provided that "thing-a-ma-bob." As you drive, you begin to appreciate all
the careful planning that went into the fine automobile.
We encourage you to take Obs Toolkit out for a drive. Press your foot
down, see what it can do. Like a good high performance car, you'll find
that it "corners like it's on rails."
Enough with the allegory. This Toolkit was written with the user in mind.
It tries not to presume what you want to do, but to give you the
flexibility to easily accomplish your tasks.
Give Obs Toolkit a full evaluation. You'll soon wonder how you got along
without it.
The following items are general concepts and descriptions of items that
will greatly enhance your understanding of the Toolkit.
-16- Obs Toolkit 1.5 Getting Started
WildSpecs
---------
WildSpecs are strings that are designed by you to match a select class of
filenames. WildSpecs are a superset (in usage) of DOS's wildcards.
The Metacharacters are the following:
? - matches any single character
(a substitution character is required)
* - matches any group of characters
(zero or more characters may match)
Using Obs WildSpecs permits semi-sophisticated matches, such as
*ob.* - any file who's filename ends with "OB", with any extension
Example:
The following filenames would match
keepOB.doc
OB.
The following filenames would NOT match
obtest.doc
xxxobx.ob
*ob* - any file who's filename contains "OB" anywhere in the name
Example:
The following filenames would match
OBbi.doc
glOBe.lst
OB.
The following filename would NOT match
Oxb.ob
*o*b* - any file who's filename contains "O" followed by "B"
Example:
The following filenames would match
keepOB.doc
xOxxBx.any
The following filename would NOT match
bo.
*o?b* - any file who's filename contains '"O" character "B"'
Example:
The following filenames would match
OxB.fil
xxOyBx.fil
The following filenames would NOT match
ob.
oxxb.
WildSpecs are limited to DOS's 8.3 file notation. All characters after
the eighth (in the filename) and third (for the extension) are ignored.
-17- Obs Toolkit 1.5 Getting Started
SmartPaths
-----------
The DirStack keeps track of where you've been. These places, as long as
they are still on the stack, can be referenced by SmartPaths 1: - 9:.
SmartPaths in a sense, act just like new drives. You can add additional
directory specifiers to a SmartPath, but you may not address via its
root.
Note: ObsRes or DirStack must be installed for SmartPath operation.
To view the directories on the DirStack type:
C>OCD /LIST
It will make a report like the following example:
1: C:\DOS ** Top of stack SmartPath 1: **
2: D:\TURBO\TC\CPROGS\OBSKIT ** SmartPath 2: **
3: E:\BATCH ** SmartPath 3: **
4: F:\UTIL ** Bottom of stack SmartPath 4: **
Using the example DirStack above:
C>LF 1:
Provides a directory of C:\DOS.
C>LF 2:..
Provides a directory of D:\TURBO\TC\CPROGS.
C>MF /C 2:MF.EXE 4:
Copies file D:\TURBO\TC\CPROGS\OBSKIT\MF.EXE to F:\UTIL\MF.EXE.
Note:
You cannot reference the root of a SmartPath, hence 1:\ is considered
an error.
The real time saver of this feature is when you want to address another
directory on the same drive. DOS will not permit this without
SUBSTituting in a new disk, or typing the complete path name.
Using the example DirStack above, and assuming that you are currently
located in D:\COMM\PROC\UPLOADS, you can easily copy files from the
D:\TURBO\TC\CPROGS\OBSKIT without typing the path. Simply typing:
D:\COMM\PROC\UPLOADS>MF /C 2:obskit.zip
will copy the file D:\TURBO\TC\CPROGS\OBSKIT\OBSKIT.ZIP
to the file D:\COMM\PROC\UPLOADS\OBSKIT.ZIP
TIP:
Define a LIST command to report the SmartPaths on the stack.
C>ALIAS list OCD /LIST
-18- Obs Toolkit 1.5 Getting Started
Date & Time
-----------
date = mm-dd-yy - the full date must be specified
date = -days - that many days in the past
date = -0 - represents today
date = -1 - represents yesterday
.
.
.
date = -365 - is usually an entire years worth
time = hh:mm:ss - the minutes & seconds are optional
time = . - this translates to the current time
Examples (assume the current date and time is "12-25-90 06:00:00")
"7-4-90 21:00:00"
Independence day, 1990, at 9pm.
"10-31-90"
Halloween, 1990 - time is not specified and not used.
"00:00:00"
(today - defaulted) at Midnight.
"0"
(today - defaulted) "00:00:00" - minutes, seconds default to 0.
"12:30"
(today - defaulted) "12:30:00" - seconds default to 0.
"."
(today - defaulted) now "06:00:00".
"-0"
(today - zero days ago) - time is not specified and not used.
"-1"
(yesterday) "12-24-90" - time is not specified and not used.
"-1 ."
(yesterday at this time) "12-24-90 06:00:00" (24 hours ago).
"-3 ."
(72 hours ago).
-19- Obs Toolkit 1.5 Getting Started
Quoting strings
---------------
Occasionally you may want to provide multiple words as a single
parameter. To do this, simply quote the string. All the data between a
pair of double quotes will be treated as a single word.
(e.g., "This is a Quoted string")
When using quotes, remember one thing. Don't forget to close the
quotes.
To insert a quote into a quoted string, prepend each embedded quote
with a single backslash. For example:
"This string contains a \"Quoted string\""
will yield
This string contains a "Quoted string"
Note:
You cannot place a '\' at the end of a parameter using quotes. This
appears to be a bug in the compilers runtime library.
Alias does not process quotes, it passes them through verbatim.
EnvEdit quotes are not subject to the above runtime library
"bug/feature."
Line editor
-----------
A simple line editor is provided in the Alias and EnvEdit tools. This
editor allows you to perform the following actions:
Up Arrow Move one line up (multiple line display only)
Down Arrow Move one line down (multiple line display only)
Left Arrow Move one character to the left
Right Arrow Move one character to the right
CTRL-Left Move one word to the left
CTRL-Right Move one word to the right
INSERT Toggle Insert/Overstrike mode
HOME (^A) Move to the beginning of the edit field
END (^E) Move to the end of the edit field
DELETE (^D) Delete the current character
BACKSPACE Delete the previous character
CTRL-Y Delete the entire line
RETURN (ALT-X) Store changes and exit
ESCAPE Abort changes and exit
-20- Obs Toolkit 1.5 Getting Started
ErrorLevels
-----------
A simple, but flexible policy on DOS ErrorLevels has been consistently
applied to all tools. The higher the error level, the more critical the
error was to the normal operation of the tool. At the bottom, or
errorlevel 0, is "NO ERRORs", while at the top, errorlevel 6 is an
"INSTALL" error, where the tool was unable to execute.
The ErrorLevels are as follows:
0 - NO ERROR - No error encountered
1 - NOT FOUND - File or object was "NOT FOUND"
2 - ABORTED - The user chose to "ABORT" the operation
3 - OPERATION FAILED - The requested "OPERATION FAILED"
4 - LIMIT EXCEEDED - The operation exceeded the tools "LIMIT"
5 - USAGE ERROR - The tool displayed a "USAGE" error
6 - INSTALL FAILED - The tool was unable to "INSTALL"
Redirection support
-------------------
The Toolkit's tools are all aware of redirection. When you redirect a
tools output the paging capabilities are automatically disabled. When
you pipe input into FileDump, it accepts the input and paging is
available.
Options
-------
o Options may be placed on the command line in any order.
o Options are processed from left to right.
o Options must be separated by spaces except for MultiFile and
ListFiles which do not require spaces.
o Usually options may appear anywhere on the command line (after the
tools name). For consistency in the examples provided, all options
are placed before the user supplied arguments.
Exceptions:
o ALIAS will only accept /NOSPACE, /NULL, /MAKE and /EDIT options
during an alias definition, and those options must be present
before the name of the alias to be defined.
o EE must have all options specified before the environment
variable name. The last item on the line must be the variable
name[=definition].
o The above exceptions are required so that the options above can
be passed along with the definition without being processed by
the tool.
-21- Obs Toolkit 1.5 Getting Started
o Throughout this document, options are defined in UPPER and lower
case. The UPPER case portion is the minimum string recognized by the
tools. The lower case is the remainder of the option name. The lower
case portion is always optional, but if present must match.
o Sometimes options are cumulative, and sometimes they are exclusive.
This approach was selected so that you can customize the operation
of a command using ALIAS and then override the selection when at the
command line.
Reading the Usage
-----------------
Parameters specified between '[' & ']' are optional. Their presence is
not required (the specific operation is dictated by the particular
tool).
Parameters specified between '{' & '}' are repeatable.
Parameters separated by a '|' are one or the other.
You do not type the above symbols!
Press any key...
----------------
To pause a scrolling display you may specify /Page as an option, or
press the <ESC> key during the scroll. Paging is automatically
disabled when redirecting output.
When the computer is waiting at the "Press any key to continue..."
prompt, you may enter the <ESC> key for a continuous scroll, or any
other key to view the next screenful.
When FileDump is at "Press any key...":
o A Carriage Return will advance a single line.
o The percent of file viewed will be appended to the prompt.
o If multiple files were selected for display:
o The current filename will be appended to the prompt.
o Issuing a CTRL-C will skip to the next file (if any).
Help Screens
------------
Items identified on the help screen with a '*' are default or normal
operations.
Items identified with a '+' are active positive; hence a '+' on OCD's
/[NO]UPDATE option indicates /UPDATE. When a '+' is not present the
switch is active negative (i.e., /NOUPDATE).
-22- Obs Toolkit 1.5 ObsRes
ObsRes (OBSRES), ReRes (RERES) & DirStack (DIRSTACK)
----------------------------------------------------
ObsRes
------
Description:
ObsRes is a well behaved memory resident utility (TSR) that provides
a central focal point to Obs Toolkit. All of Obs tools except for
Alias will function without ObsRes, but some functionality will be
lost.
ObsRes complements DOSKEY by adding silent, abbreviated aliases and
the DirStack. Even the multiple commands in the DOSKEY macros are
translated by Obs aliases.
ObsRes serves four (4) key functions:
1) Performs the Alias translations from NAME to COMMAND
2) Maintains the Alias dictionary in resident RAM
3) Maintains the DirStack (directory stack) in resident RAM
4) Offers DOT commands to control translator operations
====> ObsRes must be installed after any command line editors.
Command line editors play around with the input and ObsRes
will never see it.
If it is necessary to load ObsRes before such a program, then
you can use ReRes to get control back.
If you use a DOS command line editor (many are available (DOSKEY is
free with DOS 5)), then the recall buffer will contain the command
that you typed. If you don't use a command line editor (why would
you not?) then the command recall (F3) will contain the translated
command.
If you are using NDOS or 4DOS and you want to use Obs Aliases, then
issue the SETDOS command with the /L1 option. This will inform NDOS
and 4DOS to get keyboard input the same way that COMMAND.COM does.
Your other option is to just install the DirStack. Aliases are
provided for NDOS/4DOS in a file called XDOS.CFG.
Each alias defined takes the number of characters defined plus five
(5) bytes of overhead (four (4) on /NOSPACE definitions).
Each DirStack entry takes up 67 bytes.
The sum space requested is combined with ObsRes resident code to
produce the resident space requirement. The actual amount of memory
reserved for a TSR is variable depending upon the current
environment block and the TSRs Drive:\Path\FileName.exe.
-23- Obs Toolkit 1.5 ObsRes
Usage:
OBSRES [Dictionary size [DirStack Depth]]
Options:
Dictionary Size
Specifies the number of bytes to retain for alias definitions.
This directly affects the size of the resident image. For each 16
bytes, 1 paragraph (16 bytes) is reserved.
Minimum size - 128 bytes
Hardly enough for anything serious.
Maximum size - 4096 bytes
More than enough for even the most serious. If this is not
enough, then we apologize. The limit is there to inhibit the
unaware from eating up too much memory. Send us a request,
we'll grow to meet your needs.
Default size - 2048 bytes
A modest amount that will meet the needs of most users.
TIP:
Use ALIAS /STATUS to determine the slack space in the Alias
dictionary.
DirStack Depth
Specifies the number of locations to be maintained on the
directory stack.
Minimum depth - 1 entry
This allows you to return from whence you came and provides one
(1) SmartPath.
Maximum depth - 9 entries.
This is a lot for even the most keen. This is a hard and fast
limit. You can only use one letter to identify a disk, and all
the characters are reserved by DOS.
Default depth - 4 entries.
This provides for ample POPs, and four (4) SmartPaths.
Internal Commands:
ObsRes has four (4) internal DOT commands to configure its operation.
The internal commands are there to permit you to enable and disable
certain features of the Toolkit during the customization process.
.ON -- Enable the translator
.OFf -- Disable the translator
.Echo -- Enable the translation echo
.Noecho -- Disable the translation echo
-24- Obs Toolkit 1.5 ObsRes
The .ON and .OFF are particularly handy when optimizing system
performance by setting the definition of the "OB" alias. If the
response "Bad command or file name" occurs, because recursive aliases
are installed incorrectly, then typing ".OFF" will place COMMAND.COM
back into control.
The .ECHO and .NOECHO can be used to see what the effect of the
translation is, so that the bad command can be isolated and
corrected.
The ".COMMAND" operations are further described in ALIAS under their
appropriate "/COMMAND". The ".COMMANDs" are not available in batch
files.
If you are having difficulty accessing aliased commands, then refer
to Installation / Bad command or file name.
Examples:
OBSRES
This will install ObsRes into memory with a default dictionary
size of 2K and a default DirStack depth of 4 entries. The memory
burden on your system will be roughly 4000 bytes.
OBSRES 1024 9
This will install ObsRes into memory with a dictionary size of 1K
and a DirStack of 9 entries. The memory burden on your system
will be roughly 3400 bytes.
TIP:
You can load ObsRes into High memory using an intelligent memory
manager such as the ones provided by DOS 5, Quarterdeck or Qualitas.
This will allow you to maximize your conventional memory.
If don't want Obs aliases then use the stand-alone DirStack.
-25- Obs Toolkit 1.5 ReRes
ReRes
-----
Description:
ReRes is also a memory resident utility. We discovered the need for
it when we would shell into DOS from Windows/real mode and DESQview,
only to discover that we had lost our aliases. The DirStack was
still available and we could list aliases, but the commands just
weren't getting swapped. We lost our powers, what a horror.
The answer was to gen up a tiny utility (128 resident bytes) to get
back into the driver's seat. This is about as small as a TSR can get
without getting heavy into playing musical bytes.
ReRes serves one (1) function:
To regain aliases after you shell into a program that disables
them.
====> ReRes can be installed to regain alias control after a program
has hidden ObsRes.
ObsRes must have previously been installed. ReRes works with ObsRes
only.
If ObsRes is still functional (not locked out) and not supporting
DOSKEY when ReRes is installed, the effect will be to nest the
application of aliases one level for each ReRes installed.
If ObsRes is supporting DOSKEY when reres is installed, the effect
will be to enable aliases for many programs that read input the same
way the COMMAND.COM used to.
Note: NDOS and 4DOS users
ReRes cannot claim back the command line after these programs have
been installed unless their SETDOS /L1 command is issued.
-26- Obs Toolkit 1.5 DirStack
DirStack
--------
Description:
Many of you may be using one of the popular alias programs available
on the market, or using a COMMAND.COM replacement that won't support
third party alias programs. To minimize the memory burden on systems
that don't require the Obs alias translator, you can use this small
utility to maintain a just a DirStack.
DirStack provides you with an optional way to configure the system
to minimize memory usage.
Usage:
DIRSTACK [DirStack Depth]
Options:
DirStack Depth
Specifies the number of locations to be maintained on the
directory stack.
Minimum depth - 1 entry.
Maximum depth - 9 entries.
Default depth - 9 entries.
Note:
DirStack does not offer nor perform alias translations. If you want
Obs aliases then use ObsRes.
-27- Obs Toolkit 1.5 Alias
Alias (ALIAS)
-------------
Description:
ALIAS is a tool to allow synonyms to be created and executed as a
part of DOS. It is a clean and easy way to build custom commands
without having to resort to disk eating batch files.
Commands can be as simple as
1) Renaming a program to something you are more comfortable with
2) Invoking a program that isn't in your path
3) Invoking a program with certain options
4) Bypassing internal commands to something a tad bit more usable
Notes:
ObsRes must be installed in order for ALIAS to operate.
Aliases do not function in batch files. We haven't built that
tool yet, so in your batch files you'll have to type out each
command with the correct options selected.
Aliases do not work in all DOS shells. To minimize this
inconvenience ReRes reinstates aliases in shells that have
disabled them. If you use DOSKEY then the next crop of
applications should work fine.
Aliases all come with spaces. If you do not want a space at the
end of your alias, then you must prefix the definition with the
/NOSPACE qualifier.
Alias provides six (6) functions:
1) Placing aliases into the dictionary (e.g., ALIAS name command)
2) Outputting the dictionary in a form suitable for /FILE
processing or batch files (e.g., ALIAS > name.bat)
Note: Redirection will not store the comments which may be in
your alias definition file.
3) Setting translation options (e.g., ALIAS /ON)
4) Getting status on current translation options (ALIAS /STATUS)
5) Editing existing aliases (ALIAS /EDIT name)
6) Defines the translation skip character (ALIAS /SKIPCHAR 'x')
-28- Obs Toolkit 1.5 Alias
TIPS:
Use Alias to build custom commands.
Once an alias is defined, you can bypass it by preceding the command
with the skip character. The skip character defaults to a space ' '
unless changed. Assuming that DIR has been aliased (e.g., ALIAS dir
LF) and that the skip character is still a space.
C>DIR - this would invoke the aliased DIR (lf)
C> DIR - this would invoke DOS's DIR
Usage:
ALIAS
This displays all currently defined aliases.
ALIAS name
This displays the translation (if any) for NAME.
ALIAS name*
This displays the translation (if any) for all aliases begining
with NAME.
ALIAS [/NOSPACE] name command
This defines an alias where NAME translates to COMMAND. Alias
names can be abbreviated by using a single quote. All single
quote characters are ignored during translation and should be
only be used for indicating an abbreviation.
ALIAS /NULL name
This defines a null alias.
ALIAS [options]
The options are defined and described below.
Options:
/[NO]CAse - Observe case of alias names
This option instructs the translator to view aliases as case
sensitive. This means that cd != CD (is not equal to). The case
of commands is always retained regardless of this option.
Use /NOCASE to disable case sensitivity.
/CLear - Delete all aliases
This command deletes all aliases. When ObsRes is first installed
the alias dictionary is clear.
/Delete - Delete an alias
Usage: ALIAS /DELETE name
This removes an alias definition. If the alias does not exist
then no error is reported.
-29- Obs Toolkit 1.5 Alias
TIP:
Create an unalias command to remove aliases.
C>ALIAS unalias ALIAS /DELETE
/[NO]ECho - Echo translations to the console
This option instructs the translator to echo the translation
command to the console whenever a substitution is made. The
translation is output to the display just below the command line.
This command is directly available as a ".COMMAND" from the
command line (.ECHO).
TIP:
This can be useful to learn commands and their options.
Echo can let you know when translations are occurring.
Use /NOECHO to disable echo translations.
/[NO]EDit - Edit the specified alias definition
Usage: ALIAS /EDIT name
This command will bring up a line editor to allow you to edit the
current alias name/command pair. Using the line editor is simple
and intuitive. Refer to "Getting Started / Line Editor" for a
description of the line editor commands.
TIP:
When you want to make a change to an existing alias, don't
redefine it; /EDIT it.
Note:
When you change the name of the alias, the old alias is
deleted and the new alias is added.
/File - Process alias commands from a file
Usage: ALIAS [/CLEAR] /FILE filename.ext
This option directs the alias generator to read the specified
file and process the commands as if they were issued at the
command line.
DOS commands ECHO and REM are processed the same as DOS would.
ECHO controls whether commands are echoed to the console or
not and can be used to display messages to the console.
REM can be used to place comments into the alias definition
file.
The DOS 3.3+ '@' command qualifier is processed also. It inhibits
echo of the current line regardless of the ECHO state.
-30- Obs Toolkit 1.5 Alias
Alias definition files can be nested. The nesting limit is
limited only by the maximum number of open files.
Note:
Unlike DOS batch processing, the initial ECHO mode for alias
definition files when processed by the alias generator is ECHO
OFF.
If a line in the alias definition file is not understood by
the alias generator, then an error message for that line will
be posted. The line will be ignored and processing will
continue with the next line.
/CLEAR can be used to clear out the existing aliases before
loading in the new set.
/Make - Define a path alias
Usage: ALIAS /MAKE name
This option defines a path alias. The alias is defined to be
ALIAS /NOSPACE name <current directory>\
The command is provided so that the TRYIT.BAT program can provide
direct access to the commands without knowing, in advance, which
directory the Toolkit was placed into.
/NOSpace - Do not add a space after the name when translating
Usage: ALIAS /NOSPACE name cmd
This option is valid during an alias definition only. Use of this
option directs the translator not to place a space after the
translation. This allows catenation of an alias with its
supporting text.
Example:
C>ALIAS /NOSPACE chmod MF /SA
C>chmod +r file.exe
When CHMOD is issued at the command line the first command line
argument will be directly appended to the translation. This
yields (using the example above)
C>MF /SA+r file.exe
/NUll - Define a null alias
Usage: ALIAS /NULL name
This option allows you to define a NULL alias. One that
translates to nothing. This option allows you to place a prefix
before a command name and to disable it when necessary. This
option needs recursion to be active in order to be effective.
-31- Obs Toolkit 1.5 Alias
Example:
C>ALIAS /RECURSE
C>ALIAS /NULL ob
C>ALIAS ocd ob ocd.exe
C>ALIAS cd ocd
When CD is typed at the command line, the command will be
equivalent to C>OCD.EXE. If OB were to be defined as
C>ALIAS /NOSPACE ob c:\util\
then, when CD is typed at the command line, the command will
be equivalent to C>C:\UTIL\OCD.EXE
/ON - Enable translator (default)
This option returns the translator to its active state. If the
translator was already active, then no change will occur.
This command is also directly available as a ".COMMAND" from the
command line (.ON).
/OFf - Disable translator
This option causes the translator to become passive. This may be
handy if some program needs the aliased commands and it is not
convenient to precede them by a space.
This command is also directly available as a ".COMMAND" from the
command line (.OFF).
TIP:
If ALIAS translations affect one of your programs adversely
(keeps swapping your text), then use a batch file to turn the
aliases off, execute your program and then turn the aliases
on again.
/[NO]Page - Page the output
This instructs ALIAS to pause when outputting aliases and the
screen is full.
/[NO]Recurse - Recursively apply aliases
This allows aliases to be defined in terms of other aliases.
After an aliased command is translated, the translator will
attempt to translate the new command.
Use /NORECURSE to disable recursive alias translations.
Note:
The recursion process is limited to ten levels. If more than
ten levels are detected, the translator will report an error
and the command line will be ignored. This is to prevent an
endless loop (when a command aliases back to itself).
-32- Obs Toolkit 1.5 Alias
TIP:
Use recursive aliases to reduce program access time.
Example:
C>ALIAS /RECURSE
C>ALIAS dir LF
C>ALIAS bytime LF /OD
C>ALIAS lf ob lf.exe
C>ALIAS /NOSPACE ob c:\util\
When the DIR, or BYTIME command is issued, the translator
will use "c:\util\lf.exe ". This way, LF can be accessed
immediately without DOS having to search the PATH.
You can verify this performance advantage by using
C>LOCATE dir
You can see the translation passed to the command line by
enabling the /ECHO feature.
The performance advantage may not be so noticeable if you
are using good disk caching software or a very fast disk.
/SKipchar - Define the "Skip Translation" character
Usage: ALIAS /SKIPCHAR "x"
This command defines the single character which signals to the
alias translator that no translation should occur. The skip
character can be enclosed in double, single, or no quotes.
The skip character can be used to accomplish two different
things.
1) At the command line you can stop a translation from
occuring.
2) In an alias definition you can stop recursion. Assume that
the skip character has been set to '!', then the following
would no longer be recursive:
ALIAS LF !LF /P
/STatus - Get current status of the alias translator
Display the mode that the alias translator is working in. The
status information tells whether the translator is active or
passive (on or off); whether or not the translator is case
sensitive; whether or not translation echoes are being performed;
whether or not aliases are being applied recursively; the current
skip character; the number of aliases defined and the amount of
free space available in the translator's buffer.
-33- Obs Toolkit 1.5 Alias
Examples:
C>ALIAS unalias ALIAS /DELETE
This defines UNALIAS to be equivalent to ALIAS /DELETE. Whenever
you want to delete an alias just type UNALIAS CMD.
C>ALIAS > aliases.bat
This uses DOS redirection to create a batch file that saves the
current aliases and alias translator settings. The batch file can
be executed later to add these aliases back into the translation
table. If you chose to keep comments in your alias definition
file, then it is better to use an editor to add permanent aliases.
Redirection does not store comments.
TIP:
Use DOS redirection to save your aliases in a batch file.
C>ALIAS > myalias.bat
That file can be processed by DOS (as a batch file) or by
ALIAS using the /FILE option. Letting ALIAS process the file
is significantly quicker.
TIP:
Place ObsRes in your AUTOEXEC.BAT file (after DOSKEY or other
command line editors) and then call the alias definition file
(which you create) with ALIAS /FILE so that the aliases that you
want to keep are available each time you reboot or power-up your
machine.
C>ALIAS /STATUS
This tells you what the current configuration the translator is
executing under. It reports translator conditions such as:
o Case sensitivity (on / off)
o Translator (on / off)
o Recursion (on / off)
o Echo (on / off)
o Current skip character
o Number of aliases defined
o Size and space available in alias dictionary
C>ALIAS /NOSPACE ob c:\util\
This will define an alias named OB. The alias definition is
special in that when a translation occurs it will not append a
space after the translated text.
C>ALIAS lf ob lf.exe
Using the OB alias definition above and recursive aliases, the
translation for LF will be C:\UTIL\LF.EXE. This principle is
applied to all of Obs Toolkit commands that are supplied in the
recursive alias definition file.
-34- Obs Toolkit 1.5 Alias
C>ALIAS /NULL ob
This would cause the translation of OB to be nothing. Using the LF
definition immediately above and recursive aliases, the
translation of LF will be LF.EXE. The use of the NULL qualifier
allows you to revert back to path searching when invoking aliased
commands.
C>ALIAS unalias
This will show you the translation of UNALIAS if it exists. If
UNALIAS does not exist, then no operation will be performed.
C>ALIAS go'to locate /command /change
This is an abbreviated alias that will go to the directory where
an external command is found. Being an abbreviated alias you can
enter the command using (GO, GOT, or GOTO).
C>ALIAS a*
This will show you the translations for all aliases that start
with the letter 'A'.
Notes:
If you are more comfortable with case sensitive aliases, then use
the /CASE switch.
Note:
If you do switch from CASE to NOCASE then the NAME with the
nearest upper-case character will take precedence over the NAME
without. When you switch back from NOCASE to CASE, order will be
returned.
=> The above rule is true even when you redefine or delete an
alias name.
The alias dictionary size defaults to 2K bytes but can be set via
ObsRes at its installation time.
Default configuration for the translator is:
1) Case insensitive
2) Echo disabled
3) Translator active
4) Recursion disabled
5) Skip character is a ' ' (space)
Alias NAMEs cannot contain any of the following characters:
(space comma tab / \ | [ ] , ; " + = )
in addition, the appearence of any of the above characters on the
command line will terminate the alias.
-35- Obs Toolkit 1.5 DirSize
DirSize (DS)
------------
Description:
DirSize provides a pictorial tree of directories and sub-directories
but adds little twists.
DirSize /SIZE counts the files and space allocated (in clusters) to
each directory. DirSize /DATE displays the creation dates of each
directory.
You can sort the tree by name, size, or date.
Hidden directories are displayed in lower case.
Usage:
DS [options] [drive][directory]
Options:
/BYDAte - Chronological sort
Display the tree branches in chronological order.
/BYDOs - No sort (default)
In default DOS order.
/BYName - Alphabetical sort
Display the tree branches in alphbetical order.
/BYSize - Disk usage sort
Display the tree branches from the largest to the smallest.
/[NO]Count - Continue the Count
Usage: DS /COUNT /DEPTH num dirname
When the directory tree is abbreviated to a specific depth (see
/DEPTH), counting is also suspended at that depth.
You may want to have accurate results but are not interested in
having the tree drawn out to umpteen levels. By using this
option, DirSize yields correct results even if the tree is
abbreviated.
/[NO]DAte - Display directory creation date
Usage: DS /DATE
This option causes the tree to contain the creation date of the
directory.
This option may be combined with /SIZE, but the screen may get a
little cluttered.
-36- Obs Toolkit 1.5 DirSize
/DEpth - Limit depth of tree
Usage: DS /DEPTH num
When you have a lot of sub-directories, you may not want to see
the tree draw them all. Using this option abbreviates the tree to
the specified depth.
A consequence of abbreviating the tree is that the sizes may be
incorrect. Abbreviated trees are indicated by the appearance of
an asterisk '*' next to the file count. The asterisk indicates
that there were more sub-directories in the branch.
If it is important to have the sub-directories counted, but you
don't want them in the pictorial tree, then combine the Depth
parameter with the Continue Count option (see /COUNT).
/[NO]Page - Page output
Page the directory tree out, one screenful at a time. Paging is
25/43/50 line aware.
/[NO]Size - Display directory size (Default operation)
Usage: DS /DATE /SIZE
Display size information of the directories in the tree.
The size information contains the sum space of a directory, all
of its' sub-directories, the space allocated to this directory
alone, and the number of files in the directory.
Finally a summary on the disk space allocated to the root of the
tree, and disk space available on disk is reported in both bytes
and as a percentage of total disk space.
TIPS:
When you need to free up some disk space, use DirSize /SIZE to
pinpoint a directory that will give you the amount that you need.
Use DirSize to get a pictorial representation of the directory tree
structure.
If you always want output that is paged, then use Obs Alias
generator to redefine the DS command to include the options.
C>ALIAS ds DS /PAGE
Examples:
C>DS
Outputs an unsorted DirSize size tree rooted at the current
directory.
C>DS /NOSIZE /BYNAME
Outputs a bare tree rooted at the current directory which was
sorted to be in alphbetical order.
-37- Obs Toolkit 1.5 DirSize
C>DS /PAGE
Outputs a DirSize size tree starting at the current directory.
Output is paged for easy viewing.
C>DS /DEPTH 2 c:\
Outputs a DirSize size tree for the C: Drive, starting at the root
directory. The tree will be to two (2) sub-directories deep.
Remember that in this case, the size information may be incorrect
because DirSize didn't look into the child directories of the
branches beyond Depth level three (3).
C>DS /DEPTH 2 /COUNT c:\
Same as the previous example, except that the size information is
correct because DirSize Continued to Count files, but only drew
the tree to two sub-directories.
C>DS /DATE
Outputs a DirSize date tree starting at the current directory.
Notes:
Using the Depth option without the Continue to Count will not
produce total directory size information if the tree contains
branches beyond the specified depth level.
Using the Depth option can speed up tree operations on disks with a
lot of sub-directories.
Kudos:
Gus Vendito, executive editor PC Magazine, stated to CompuServe
magazine (Nov 1990, MS-DOS special insert), that DirSize was his
favorite unique utility.
-38- Obs Toolkit 1.5 EnvEdit
EnvEdit (EE)
------------
Description:
EnvEdit enables you to modify the DOS environment blocks. It comes
with a line editor to simplify many mundane command line tasks, and
comes with a batchable editor to allow streamlined system operation.
EnvEdit is capable of editing the active environment block, the
invoking parents environment block, the DOS master / root
environment block, and even the environment block created just for
it.
Soon you'll wonder how you ever got along without it.
TIPS:
Redefine the PATH statement to automatically invoke the editor.
C>ALIAS /NOSPACE path EE /EDIT /NOREMOVE path=
This will permit your PATH command to act as normal but with one
exception. Normally when PATH is typed at the command line all by
itself, DOS would display the active path. Now PATH will bring up
a line editor which permits you to view or make changes
interactively.
Use the batching capabilities to add and remove path portions
when batching to a program that requires access to the path. This
will allow shorter paths, providing more system memory, and
decreasing search time to commands on the path.
Usage:
EE [options] [variable[=string]]
Entering EE without a variable will display all currently defined
environment variables.
Entering "EE var=" will remove the definition for the environment
variable VAR. Note: This can be inhibited by using the /NOREMOVE
qualifier.
Options:
/Append - Add the following text
Usage: EE /APPEND "text" variable
This command, useful during batch files, will append the
specified text to the end of the variables value.
/[NO]CAse - Variable name is case sensitive (default /NOCASE)
Usage: EE /CASE variable[=string]
This option determines whether the variable name is considered
case sensitive or not.
-39- Obs Toolkit 1.5 EnvEdit
/CLear - Clear out the environment
This command will clear out the environment and leave only the
COMSPEC and a null PATH. This is what the environment looks like
before you add things to it.
If /CLEAR is combined with /SAVE or /LOAD then its operation will
take place after /SAVE and/or before /LOAD.
/COpy - Copy one variable into another
Usage: EE /COPY target source
Make a duplicate of an environment variable.
If /COPY is combined with any other operations, then a copy of
the environment variable will be made before the other operations
are carried out.
/CUrrent - Use the current environment block
This is the environment block allocated to EE itself. Any changes
made to this environment block will be lost as soon as EE
terminates.
Software developers will find this feature handy when
constructing custom environment blocks for shells, and want to
speed development.
Note:
/CURRENT does not provide any benefit to the casual user.
/DECrement - Subtract one from the variable
Usage: EE /DECREMENT variable
This command will set the contents of variable to variable-1. The
contents of the variable must be an integer number.
/DELete - Delete the variable
Usage: EE /DELETE variable
This command will delete the specified environment variable.
This command is for those users that are not comfortable with
C>SET TEMP=
to delete the environment variable TEMP, and for those who have
used the /NOREMOVE switch as a default.
/DOs - Use the current DOS environment block (DEFAULT)
This is environment block that COMMAND.COM will pass to each
program that it invokes. This will normally be the environment
block that you want to modify.
-40- Obs Toolkit 1.5 EnvEdit
/[NO]Edit - Enable / Disable editor (default /NOEDIT)
Use of this option will bring up a line editor on the contents of
the environment variable. The environment variable and definition
are limited to the amount of environment space available or 512
characters for the single environment variable, whichever is
less.
Refer to Getting Started / Line Editor for a description of the
line editor.
/INCrement - Add one to the variable
Usage: EE /INCREMENT variable
This command will set the contents of variable to variable+1. The
contents of the variable must be an integer number.
/INSert - Insert the following text
Usage: EE /INSERT "text" variable
This command, useful during batch files, will insert the
specified text onto the beginning of the variables value.
/LOAd - Load environment from a file
Usage: EE [/CLEAR] /LOAD filename.ext
This command will load/modify the variable definitions with the
contents of the specified file. You can optionally /CLEAR the
environment before loading it.
/LOWer - Change variable contents to all lower case
Usage: EE /LOWER variable
This command makes the contents of variable to be all lower case.
This command does not work on the PATH variable. The PATH must
always be in upper case.
/MAKe - Define a path environment variable
Usage: EE /MAKE variable
This command will define an environment variable to be the name
of the current working directory and disk.
/MASter - Use the master environment block
The MASTER environment block is the environment block created
when DOS first boots. This is the environment block that the
AUTOEXEC.BAT modifies.
The size of this environment block is fixed (normally 160 bytes,
256 for DOS 5), but can be set by using a DOS SHELL command in
your CONFIG.SYS file (/E: specifies number of bytes).
SHELL=[path]COMMAND.COM [path] /E:256 /P
-41- Obs Toolkit 1.5 EnvEdit
/Parent - Use the environment block of the parent
The parent environment is the environment block that created the
currently active "/DOS" environment block. If you use a menu
driven dispatch program to insulate you from the command line,
then the PARENT environment would be the environment block that
belongs to the dispatch program.
/[NO]REMove - Remove on null definition (default /REMOVE)
Use of /NOREMOVE option will inhibit deletion of the variable
when a null assignment is made "EE VAR=". This options importance
can be seen when you want to set the PATH command up as an
automatic edit, yet you also want the ability to set the PATH
directly "PATH dir1;dir2;..."
/REName - Change the name of the environment variable
Usage: EE /RENAME newname oldname
This command allows you to change the name of an environment
variable.
/REPlace - Replace the following text
Usage: EE /REPLACE "current" "new" variable
The REPLACE command allows you to replace a group of text in a
variables definition with another group of text (possibly null).
REPLACE is Case Sensitive.
To delete a section from an environment variable, you can replace
it with nothing.
/ROot - Use the master environment block
See /MASTER. /ROOT and /MASTER refer to the same environment
block.
/SAve - Store the environment into a file
Usage: EE /SAVE filename.ext
This command will save the environment into a file.
The environment will be saved before the /CLEAR, /LOAD or any
other operation modifies it.
/[NO]STatus - Status about environment block (default /NOSTATUS)
This option requests a status report on the selected environment
block. The status report indicates the address and size of the
environment block, and the number of bytes available in the
environment block.
/[NO]Quiet - Display output (defalut is /NOQUIET)
This option instructs EnvEdit not to output the contents of the
environment variable, or an error message if the environment
variable is not found.
-42- Obs Toolkit 1.5 EnvEdit
This works great in a batch file to determine if an environment
variable is defined.
/Upper - Change variable contents to all upper case
Usage: EE /UPPER variable
This command makes the contents of the variable to be all upper
case.
Notes:
Because of DOS limitations (prior to DOS 5.0), when you shell or run
a batch file, and you attempt to add characters to your environment
block, you may occasionally get "Out of environment space." This is
not a flaw in EE, but a limitation of DOS. DOS shrinks the
environment block down to minimum size whenever it creates a new
process. By definition this means that there is only a small amount
of space from which to work (16 bytes or less).
The out of space problem can be worked around by declaring
placeholders in your root environment and deleting them when you
shell or batch. Any space that you make available will be available
for your use.
The out of space problem plagues DOS's own SET command when invoked
in a batch file, but plagues only EE when invoked from the command
line.
TIPS:
Define the following commands:
ALIAS set EE /EDIT
ALIAS /NOSPACE path EE /NOREMOVE /EDIT path=
ALIAS /NOSPACE prompt EE /NOREMOVE /EDIT prompt=
Trick:
You can use EnvEdit editing capabilities to generate a PATH longer
than you could using the command line.
Examples:
Using PATH=C:\DOS;C:\UTIL;
If you wanted to add C:\WINDOWS to the end, you would use
C>EE /APPEND c:\windows; path
This would set PATH=C:\DOS;C:\UTIL;c:\windows;
If you wanted to add C:\WINDOWS to the beginning, you would use
C>EE /INSERT c:\windows; path
This would set PATH=c:\windows;C:\DOS;C:\UTIL;
Using PATH=C:\DOS;c:\util;C:\WINDOWS;
If you want to delete C:\UTIL, you would use
C>EE /REPLACE "c:\util;" "" path
This would set PATH=C:\DOS;C:\WINDOWS;
-43- Obs Toolkit 1.5 EnvEdit
C>EE /DELETE temp
This will delete TEMP.
C>EE /EDIT path
This will bring up a line editor on PATH.
C>EE /COPY temp path=c:\util
This will make a duplicate of the current PATH into a new variable
named TEMP. EnvEdit will then modify the PATH to be just C:\UTIL.
EnvEdit Batch looping
---------------------
This is an example of looping in a batch file (decrementing):
rem Set count to the number of iterations through the loop
EE count=10
:TOP
rem do something useful (this will be executed 10 times)
rem ...
rem ...
EE /DECREMENT count
if not %count% == 0 goto top
EE /DELETE count
EnvEdit Batch parameter testing
-------------------------------
This is an example of testing a batch parameter:
rem Copy the variable and change the copies case to UPPER
EE /UPPER tmp=%1
if %tmp%. == OBS. goto yes
echo %1 is not (obs obS oBs Obs oBS ObS OBs OBS)
goto done
:YES
echo %1 is a variant of OBS
:DONE
EE /DELETE tmp
EnvEdit Batch environment save & restore example
------------------------------------------------
This is an example of saving and restoring an environment in a batch
file:
rem Save and clear the environment
EE /SAVE env.fil /CLEAR
rem You now have an empty environment from which to work
rem ...
rem (be sure to use fully qualified filenames)
rem ...
rem Restore the previous environment
EE /CLEAR /LOAD env.fil
-44- Obs Toolkit 1.5 FileDump
FileDump (FD)
-------------
Description:
FileDump is a universal / versatile file viewer. The display can be
selected to be TEXT (like DOS TYPE), or ASCII (new and unique), or
HEX (like a debug dump).
Other operations it can do is to count characters, words, lines, and
pages; display only strings of a user specified length; start and/or
stop anywhere in the file (by byte or line); number output lines;
and more.
FileDump is capable of viewing/converting files from UNIX and
Macintosh formats.
Usage:
FD [options] { [SmartPath] [Directory] WildSpec }
Files are always presented in sorted order. Sorting is performed on
a WildSpec by WildSpec basis. In other words
C>FD *.txt *.doc
will sort the .TXT files and display them, and then sort the .DOC
files and display them.
While viewing output you can perform the following operations:
o When text is scrolling:
o <Escape> will Enter/Exit paging mode
o Control-O will suppress output, press any key to return to
normal output (this will advance you through the file(s))
o When in paging mode any key will freeze output
o When you are at a "Press any key..." prompt:
o <Enter> will advance one line
o <Escape> will exit paging mode
o Control-C will skip to the end of file
o any other key will advance one screenful
Options:
/7 - 7 Bit ASCII
Strip and discard the Most Significant Bit from each character.
/8 - 8 Bit ASCII
Do not modify the incoming characters.
/Ascii - Report only ASCII characters.
Non-ASCII characters are reported as spaces.
The /COMPRESS option will compress runs of non-ASCII characters to
a single space.
-45- Obs Toolkit 1.5 FileDump
The /SMART option will translate Carriage-Return / Line-Feed
pairs, and expand tabs. This enables an all ASCII text file to be
displayed normally.
With /NOSMART the /BEGIN and /END offsets are in bytes.
With /SMART the /BEGIN and /END offsets are in lines.
/BEgin # - Set the start offset for output (default is 0)
Usage: FD /BEGIN [-]count[x] { WildSpec }
A positive number (absolute or relative (e.g., 5, or +5)),
indicates that the output should start at unit 5. Hex offsets can
be provided by appending an 'x' to the end of the number.
A negative number (e.g., -10), indicates that the output should
start 10 units before the end of the file.
A unit is either a byte or line, depending on the selected output
mode.
/BInary - Open file as binary
This option forces the file to be opened in binary mode instead of
text mode.
Example:
To create a file catenator use FD
ALIAS cat FD /BINARY /TEXT
Then CAT will glue files together
CAT part1.fil part2.fil part3.fil > complete.fil
/[NO]COMpress - Compress runs (default is /NOCOMPRESS)
This option compresses runs to singles. It's specific operation
depends on the output mode selected.
If the output mode is /ASCII, runs of non-ASCII chars are
compressed to a single space.
If the output mode is /TEXT, runs of Carriage-Return / Line-Feeds
are compressed to a single line.
If the output mode is /HEX, runs of identical output lines are
replaced with a line containing an ellipses.
/COUnt - Count items
This command causes FileDump to count the number of characters,
words, lines and pages in a file.
The default page size is 66 lines.
If non-ASCII characters are detected, then FileDump will report
the condition along with its best guess results.
The /BINARY option can be used to count a non-ascii file.
The /BEGIN and /END offsets are in bytes.
-46- Obs Toolkit 1.5 FileDump
/End - Set the end offset for output (default End-of-File)
Usage: FD /END [-]count[x] { WildSpec }
A positive absolute number (e.g., 5), indicates that the output
should stop at unit 5. Hex offsets can be provided by appending an
'x' to the end of the number.
A positive relative number (e.g., +5), indicates that the output
should stop at unit begin + 5; hence +n is begin unit + n
additional units.
A negative number (e.g., -10), indicates that the output should
stop 10 units before the end of the file.
A unit is either a byte or a line, depending on the selected
output mode.
/Hex - Hexadecimal dump
This command causes FileDump to display the contents of the source
file as a Hexadecimal dump.
The /COMPRESS will compress identical lines to a one line, and a
line of ellipses.
The /BEGIN and /END offsets are in bytes. You can use hex offsets
by appending an 'x' to the number.
The /SMART will enable display of extended ASCII characters.
The /7 & /8 have no effect on HEX output.
/[NO]NUmber - Number text lines (default is /NONUMBER)
This causes the output lines to be numbered. If output was
initiated from some offset from the end of the file, then the
lines are numbered negatively from the known origin.
This option works in /TEXT mode only.
/[NO]Page - Page output (default is /NOPAGE)
Pause after each full screenful. If multiple files are being
output, then the "Press any key..." message also contains the
filename of the current file.
/[NO]SMart - Translate output (default is /NOSMART)
This option causes data to be translated. It provides you with
formatted display output.
In /ASCII mode tabs are expanded, and Carriage-Return / Line-feeds
are displayed as new lines.
-47- Obs Toolkit 1.5 FileDump
In /TEXT mode, this option will convert files from UNIX and
Macintosh so that they can be viewed correctly. You can redirect
the output to convert the file into DOS format.
In /HEX mode, this option will enable display of the extended
ASCII characters.
In /COUNT mode, this option has no effect.
In /STRINGS mode, this option causes each string to be placed on a
separate line and tabs to be expanded.
/STrings # - Report contiguous strings
Usage: FD /STRINGS count { WildSpec }
This option causes only strings of ASCII printable characters
which run as long as the specified length to be output.
The /SMART option will separate different strings on different
lines and expand tabs.
The /COMPRESS option has no effect.
The /BEGIN and /END offsets are in bytes.
/TAb # - Set the tab setting every # spaces (default is 8)
Usage: FD /TAB count { WildSpec }
This option when combined with redirection, makes a great utility
for removing tabs from files and replacing them with the
appropriate number of spaces. The /TAB setting specifies the tab
interval.
Tip:
Define a DETAB command that uses redirection to change tabs to
spaces in a file
ALIAS detab FD /TEXT /TAB
/TExt - Raw text output (default)
Output the text in raw mode. The yields results similar to the DOS
type command.
The /BINARY option will open the file in BINARY mode instead of
TEXT mode. This is handy when catenating files together.
The /BEGIN and /END offsets are in lines.
The /COMPRESS option will compress multiple carriage return line
feed pairs to a single new line.
The /SMART option enables proper formatting for UNIX and Macintosh
files.
-48- Obs Toolkit 1.5 FileDump
/[NO]Wrap - Truncate lines (default is /WRAP)
This option controls whether long lines are wrapped from the right
hand side of the screen onto the next line.
Note: The screen width is currently fixed at 80 characters.
TIPS:
Use Obs alias generator to define the following commands:
ALIAS ascii FD /ASCII /SMART /COMPRESS
ALIAS cat FD /TEXT /BINARY
ALIAS count FD /COUNT
ALIAS dump FD /HEX /COMPRESS
ALIAS number FD /NUMBER /NOWRAP
ALIAS strings FD /STRINGS 4 /SMART
ALIAS text FD /TEXT
Examples:
C>FD file.txt
Output FILE.TXT without any special formatting.
C>FD /NUMBER file.txt
Output FILE.TXT numbering lines.
C>FD /NUMBER /NOWRAP file.txt
Output FILE.TXT, numbering lines, but eliminate the annoying
wrap.
C>FD /NUMBER /NOWRAP /BEGIN -10 file.txt
Output the last 10 lines of FILE.TXT and number the lines.
C>FD /ASCII file.obj
Output only the ASCII characters in FILE.OBJ. The other
characters are identified with spaces.
C>FD /ASCII /COMPRESS file.obj
Output only the ASCII characters in FILE.OBJ and compress runs of
non-ASCII characters to a single space.
C>FD /ASCII /SMART /BEGIN 1000 /END 2000 file.txt
Output only the ASCII characters in FILE.TXT, but interpret text
alignment characters. Start at byte 1000 and end at byte 2000.
C>FD /HEX /BEGIN -1000x /END +100x file.obj
Dump FILE.OBJ in a HEX dump fashion. Start 1000 HEX bytes from
the end of the file, and ends 100 HEX bytes later.
C>FD /STRINGS 4 /SMART c:\command.com
Search out strings of length 4 or greater in COMMAND.COM and
display them one per line.
C>FD /TEXT /BINARY a.fil b.fil c.fil > abc.fil
This will glue files A, B, and C together in the order specified.
-49- Obs Toolkit 1.5 FileDump
C>FD /TEXT /SMART unixfile > dosfile
This will convert a file from the UNIX file format into the DOS
file format.
C>FD /TEXT /SMART macfile > dosfile
This will convert a file from the Macintosh file format into the
DOS file format.
-50- Obs Toolkit 1.5 ListFiles
ListFiles (LF)
--------------
Description:
Finding the files on your disk can be difficult. DOS's directory
(DIR) can only show you the visible files and <DIR>s in a directory,
and they're presented in no apparent order. We wanted more.
Cleaning up a disk is a burdensome activity at best. Not being able
to look into the file structure makes the job even harder. ListFiles
can help.
ListFiles allows you to list the files on your disk drive the way
you want. Files can be listed by name, extension, size, time, or any
combination thereof. Your output can be formatted into 1,2,3,4 or 5
columns.
In addition, ListFiles can look for and detect special conditions on
your disk (e.g., duplicate files, old files, etc...).
Usage:
LF [options] [SmartPath][directory]{ WildSpec }
Up to 16 include WildSpecs may be supplied.
The options may appear anywhere on the command line.
Only one drive:\path specification is permitted, and it may
appear anywhere on the command line. This will root the operation
to begin at that disk:\path. If the disk:\path are not supplied
then ListFiles will default to the current drive and directory.
Options:
/1 - 12 hour time format (default)
/2 - 24 hour time format
/A - Attribute selection criteria
Usage: LF /A[[:]{ [+|-|*]R|A|S|H|D }]
This allows control over the selection of files based on a file's
attributes. There are five (5) kinds of attributes that ListFiles
recognizes;
The attributes are maintained by DOS and are:
(A) ARCHIVE; (S) SYSTEM; (R) READ-ONLY; (H) HIDDEN; (D) DIRECTORY
Use of this option causes the file attributes to be displayed
when using a lister.
Option Qualifiers
(when absent, defaults to /A+S+H (include SYSTEM and HIDDEN
files))
-51- Obs Toolkit 1.5 ListFiles
A - Archive
D - Directory
H - Hidden
S - System
R - Read-Only
Option Sub-qualifiers (when absent, defaults to '*')
* - File requires this attribute. Only files that possess this
attribute are selected.
+ - Include files with this attribute (default). This is to
collect System and Hidden files. This option qualifier has no
affect on Archive and Read-Only attributes.
- - File may not possess this attribute. Only files that DO NOT
possess this attribute are selected.
Note:
Re-specifying an attribute will set that attribute to the
current selection encountered. In other words
C>LF /A-A /A*A
will report only the files that have the ARCHIVE attribute
(the previous command to eliminate ARCHIVE files was
superseded).
Examples:
/A - All files, including SYSTEM and HIDDEN.
/A+S+H - Include SYSTEM and HIDDEN files. This can be abbreviated
to just /A.
/A*S*H - Only files that have both SYSTEM and HIDDEN attributes.
/A-R - Exclude files that are READ-ONLY.
/A*A - Select ARCHIVE files only.
/A*D*H - Hidden directories only.
/A-D - Exclude directories.
Note:
Attribute displays are not explicitly enabled when attribute
selections involve only directory restrictions.
Selection attributes override previous selection attributes for
the same attribute:
-52- Obs Toolkit 1.5 ListFiles
Files with either of the special attributes System or Hidden are
displayed in opposite case.
Example:
/A-D /A
This will include system and hidden files but exclude
directories. This is the same as (/A+S+H-D)
/A-R-A /A*R
This is read-only files without the archive attribute. This
is the same as (/A-A*R).
/B - Bare output
Usage: LF /[-]B[+]
This generates a command list output without any file information
(other than the filename.ext), and without the header and trailer
information. If you are recursing subdirectories, the disk and
directory will be prepended to the filename.ext.
If /B+ is selected the full pathnames will always be displayed.
/C - Command generator
Usage: LF /-C[B|T|E] | { /CB|/CT|/CE "meta-text" }
This allows the generation of batch files to do some operation
which Obs Toolkit does not directly support.
This option provides a way to use the WildSpecs, attribute
selection, and excludes with any application that accepts a
filename as a parameter.
To disable the active command configuration use /-C. To disable
one of the options use /-Cx.
Option Qualifiers: (no default, one must be selected)
B - Begin output with text
E - End output with text
T - Output this text for each command
Meta-text:
Meta-characters are provided to generate additional commands. The
meta-characters are the following:
$E - Escape character
$H - Backspace
$_ - Carriage return and line feed
$$ - $ (Dollar sign)
$B - | (Bar, Pipe)
$G - > (Greater-than sign, redirect output)
$L - < (Less-than sign, redirect input)
-53- Obs Toolkit 1.5 ListFiles
$D - Current date (at start of program)
$T - Current time (at start of program)
$P - Full pathname with backslash (drive:\path\)
$F - Filename
$X - Extension with dot (.ext)
All other characters are passed through verbatim.
Example:
C>LF /CT "archive /add $F$X myarch.arc" /CEexit > arch_em.bat
If the above two (2) options were invoked, ListFiles would
create an output like the following (using all files in the
current directory):
archive /add file1.ext myarch.arc
archive /add file2.ext myarch.arc
.
.
archive /add filen.ext myarch.arc
exit
This output has been redirected (via DOS) into a batch file
called ARCH_EM.BAT.
ARCH_EM.BAT can now be executed by COMMAND.COM as a batch file
by typing ARCH_EM at the command line.
C>LF /CT "FD /SMART $F$X $G $F.cvt" *.mac *.unx > convert.bat
This would generate a batch file that could be used to convert
all the .DOS and .UNX files in the current directory into DOS
files with names like filename.cvt. The batch file would look
something like the following:
FD /SMART mac_1.mac > mac_1.cvt
FD /SMART mac_2.mac > mac_2.cvt
.
.
FD /SMART unix_n.unx > unix_n.cvt
/D - Detect a special condition
Usage: LF { /DC|/DD|/DO|/DH }
This option peeks into the file structure and reports on the
oddities that it was directed to detect.
Option Qualifiers: (no default, one must be selected)
-54- Obs Toolkit 1.5 ListFiles
C - duplicate Contents
These are files that have the same exact contents. Sometimes
they have the same name and sometimes they don't. The total
file space reported allows for 1 copy. The total file count
is one per set of duplicates.
D - duplicate Directory entries
These are files that have the same filename, extension, date,
time, and size. The total file space reported allows for 1
copy. The total file count is one per set of duplicates.
The /Recurse option is technically required.
H - Hidden programs
These are the executable files that DOS won't find in a
directory because of its search algorithm.
Files in this class generally occur when you upgrade software
without explicitly deleting the older version.
Files of this type can cause some strange results when
executable files cooperate in some fashion or another.
O - Old files
These are files that have the same filename and extension,
yet for some reason or another have a different date and/or
time.
Sometimes the older files are ripe for elimination and
sometimes they are a completely different file, but happen to
have the same name; for example (DirSize, and someone else's
Directory Sort).
The /Recurse option is technically required.
/G - Report only the grand total
Usage: LF /[-]G
This is good for generating a report or summary.
When the details of which files are not important, but the fact
that the condition exists is, then this option will shrink the
output.
/L - Use lower case
Usage: LF /[-]L
This option will cause filenames and directories to be displayed
in lower case. You can use /-L to return to UPPER CASE.
/O - File display order
Usage: LF /-O | /O[[:]{ [-]D|E|G|N|R|S|U }]
-55- Obs Toolkit 1.5 ListFiles
This option determines the ordering of the directory as it is
displayed. LF /-O resets ListFiles so that there is no ordering.
Each set of "significant" sort options (D,E,N,S,U) will replace
the previous set (if any).
Option Qualifiers:
Prefix the qualifier with a '-' to reverse its meaning.
The following option qualifiers are position dependent. The
sort is ordered from the first to the last unless the '-' is
present.
D - by date/time
E - by extension
N - by name
S - by size
U - Unsorted (by directory)
The next options are not positionally dependent, and effect the
result of the overall sort operation.
G - Group directories and files.
This option causes directories to be grouped at the top
(/Og) of the listing, or at the bottom (/O-g).
R - Reverse output (global reverse).
This option causes the output to be reversed (/Or). To
place the output back into the correct order use (/O-r).
TIP:
You can use a stand alone /O to force a file listing along
with the detectors.
Examples:
/One - Sort output by filename then extension
/Oen - Sort output by extension then filename
/Odr - Sort output by the newest file to the oldest
/Os - Sort output by the smallest file to the largest
/-O - Don't sort the output at all
/P - Page the output
Usage: LF /[-]P
This option waits for the user to press a key after each full
screenful. It is 25/43/50 line aware.
/R - Recurse sub-directories
Usage: LF /[-]R
This option indicates that all sub-directories, subordinate to
the base specified (or implied), shall also be searched for
files.
-56- Obs Toolkit 1.5 ListFiles
/S - Size restriction
Usage: LF { /SL|/SE|/SG size }
This restriction excludes files that don't meet the size
requirement.
Size requirements can select files which are equal to the
specified size, greater than, less than, or somewhere between a
maximum and a minimum size.
Option Qualifiers:
E - Equal to
G - Greater than
L - Less than
Example:
/SE 0 - files without any contents 0K
/SG 65536 - files greater than 64K bytes
/SL 100 - files less than 100 bytes (disk eaters)
/T - Time restriction
Usage: LF { /TB|/TE|/TS "date time" }
This restriction excludes files that don't make the date/time
requirement.
Time requirements can select files which are equal to the
specified Date/Time (exact), written sooner than (before),
written after (since), or somewhere between two times.
Option Qualifiers:
B - Before
E - Exact
S - Since
Option sub-qualifiers:
"date time" - a date/time pair must be quoted
Examples:
/TB 1-1-90 - list all files written before 1990
(Before 1/1/90)
/TS-0 - list all files written today and beyond
(Since zero (0) days ago)
/TE-1 - list all files written yesterday
(Equal to one (1) day ago)
/W - Wide output
Usage: LF /[-]W[columns]
columns can be 1,2,3,4 or 5
-57- Obs Toolkit 1.5 ListFiles
This options causes the filenames to be output in the requested
number of columns. The normal number of columns is 1. When
columns is not specified the number of columns is 5.
One column output can display everything about a file.
Two column output can display everything but the files
attributes.
Three column output displays the filename and size where the size
is grouped with commas.
Four colum output displays the filename and size where the size
is displayed in kilobytes 'K'.
Five column output displays the filenames where directories are
identified with square brackets [].
/X - Exclude WildSpec
Usage: LF /-X | { /X WildSpec }
This option allows you to exclude files. Up to 16 exclude
WildSpecs may be supplied.
Use /-X to clear the exclude list.
TIPS:
C>ALIAS dir LF
List files in alphabetical order.
C>ALIAS bytime LF /ODNE
List files from the oldest to the newest.
C>ALIAS bysize LF /OSNE
List files from the smallest to the largest.
C>ALIAS byext LF /OUNE
List files grouped by extension. This may seem a little odd to use
the unsorted option. The unsorted option causes the directories to
be displayed in order when you recurse through them.
C>ALIAS progs LF *.exe *.com *.bat
List only the executable files.
C>ALIAS docs LF *.doc *.txt read*.*
List only the (likely) documentation files.
C>ALIAS code LF *.c *.cpp *.h *.inc *.pas *.asm
List only the source code files.
C>ALIAS dirs LF /AD
List only the directories and exclude the files.
-58- Obs Toolkit 1.5 ListFiles
C>ALIAS files LF /A-D
List only the files and exclude the directories.
You could use the alias generator to create a find file command.
C>ALIAS ff LF /R \
You could then customize the output of this find file (e.g., sort
by time, or size).
Even though it isn't ListFiles intended purpose, it was faster
than most of the Find File utilities it was benched against.
LOCATE /FILE is just a smidgit slower, but can search across
multiple drives.
Examples:
C>LF
List all normal files in the current directory. Files will be
sorted by name and extension.
C>LF *.exe *.com *.bat \util
List all the DOS executable files in the UTIL directory on the
current drive.
Files will be sorted by name, and extension.
C>LF /R /A /P
List all files (including Hidden and System) in the current and
subordinate directories.
Files will be sorted by directory, name, and extension.
File attributes will be displayed.
Page the output for convenient viewing.
C>LF /OSNER /R C:\
List all files in all directories, starting at the root directory
on drive C:.
Files will be sorted by size, name, extension. The output is
reversed; files are from the largest to the smallest.
C>LF /TE-0 /R D:\
List all files on the D: drive which were written today.
Files will be sorted by time, with the oldest file at the top, and
the most recent file at the bottom.
C>LF /DD /R \*.bak
List all .BAK files with duplicate directory entries, starting at
the root directory on the current drive.
-59- Obs Toolkit 1.5 ListFiles
C>LF /DC /R \*.bak
List all .BAK files with duplicate contents, starting at the root
directory on the current drive.
C>LF /SG 1048756 /OR /R \
List all files on the current drive that are larger than 1Mb.
Reverse the sort such that the largest files will appear at the
top of the list.
C>LF /X *.c /X *.obj /X *.exe \cprogs
List all files in the "CPROGS" directory on the current drive that
are not .C, .OBJ, or .EXE files.
C>LF /DD /DC /DH /DO /R \
List all files with duplicate directory entries, with duplicate
contents, that are hidden from DOS execution, or have the same
filename.ext yet have different date and times.
This generates a report where each option is executed
sequentially.
The reports are not intersected.
C>LF /TS. /R \
List all the files on the current drive that were written after
the current time. This isn't as unusual as it seems, some vendors
place some odd time stamps on their files.
Notes:
The /Detect options may be combined with each other, and with the
lister (/O) without affecting each other's operation. The results of
the program will be output sequentially.
Only one Lister (/O) may be selected at a time.
The /X (exclude), /Recurse, /Size, /Attribute & /Time effect the
file selection criteria, and apply to the /Detectors, and the
Lister (/O).
Files with attributes Hidden or System are always displayed in
opposite case.
DOS operational differences:
/Size is used to specify size restrictions (DOS uses /S to search
sub-directories). ListFiles can recurse subdirectories using the
/Recurse option.
-60- Obs Toolkit 1.5 Locate
Locate (LOCATE)
---------------
Description:
This utility finds out which file DOS will execute when you type is
name on the command line; and doubles as a multi-disk file find
utility.
When looking for a command, the aliased commands, and internal
command tables are consulted, and the PATH variable is searched to
find the executable files. The first match (which is the command
that would be executed) is displayed.
This utility is fully Obs alias aware, and will translate Obs
aliases as required to locate the command.
When searching for files, this command will search the disks in the
order specified (left to right), but will search each drive only
once.
TIP:
When your system doesn't do what you expect or you're not sure if
someone wrapped a batch file around the command or you want a
real fast file find for a particular command, then LOCATE it.
Usage:
LOCATE /COMMAND [options] [WildSpec]
LOCATE /FILE [options] [{ drives }] [WildSpec]
{drives} can be any number of drives A: B: C: etc... The drives will
be searched in the order specified, but each drive only once.
If no drive is supplied, then the current drive will be used.
Options:
/[NO]All - All files
This option includes system and hidden files. This option is
valid with /FILE only.
/[NO]CHange - Change to the directory where the command is found
This option, valid during /COMMAND only, will cause the current
directory to be changed to the directory where the command was
found.
Use of this option suppresses the normal /COMMAND information and
operates quietly.
/COmmand (Cmd) - Find command (default)
This option locates the specified command in the list of all
executable commands. If the WildSpec indicates a single command,
then the launch time is calculated and displayed.
Obs aliased commands are resolved.
-61- Obs Toolkit 1.5 Locate
TIPS:
Use LOCATE /Command to tune your path for frequently used
commands. Use EE /EDIT to edit the PATH during tuning.
LOCATE /Command will show that for those frequently used
commands, "LF" for example, it is best to alias them directly
to the executable file. This will significantly reduce the
access time to command.
Example:
C>ALIAS dir f:\util\lf.exe
/FIle - File search
This is a basic file find with enhanced wildcards. Multiple
drives can be searched by specifying them on the command line:
Example:
C>LOCATE /FILE c: e: locate.exe
This instructs LOCATE to attempt to locate the file
"locate.exe" on the C: and E: drives.
/[NO]FUll - Display full file information for external commands
Report the file date, time, and size for the external command.
/[NO]Page - Page output
This option instructs locate to pause when the screen is full.
/[NO]Wide - Wide output
This outputs multiple Filenames/Commands on each line.
Note:
Locate tries to be smart about whether you are looking for a command
or a file. If there is a '.' in the argument or there is a drive
specified, then locate will default to /FILE, otherwise it will
default to /CMD. You may override the default by specifying /FILE or
/COMMAND as desired.
Locate /COMMAND observes the current case setting and alias
abbreviations when attempting to resolve aliases.
TIP:
Define a file find command:
C>ALIAS ff LOCATE /FILE c: e:
FF will search the C and E drives for the requested file.
Examples:
C>LOCATE /COMMAND ds
Reports which DS would be executed if C>DS were issued as a
command.
C>LOCATE /FILE read.me
Reports all the READ.ME files on the current drive.
-62- Obs Toolkit 1.5 Locate
C>LOCATE dir
Reports what DIR would translate to if C>DIR were issued, and
times the path search to the command.
C>LOCATE c: file
This will default to LOCATE /FILE c: file. Search for FILE.* on
the C: drive.
C>LOCATE file.exe
This will default to LOCATE /FILE file.exe. Search for FILE.* on
the default drive.
C>LOCATE /CMD *.
This will display all the internal commands on your machine.
C>LOCATE /CMD *.exe
This will display all the commands in the current path that are
supported via EXE files.
C>LOCATE /FULL xcopy
This will locate the command for XCOPY and display its file date,
time and size.
C>LOCATE /CHANGE autoexec
This will locate the command for AUTOEXEC and change into the
directory where the AUTOEXEC is found.
-63- Obs Toolkit 1.5 MultiFile
MultiFile (MF)
--------------
Description:
Now that you found all those files that you want to manipulate, you
need a tool to do the job easily and efficiently. That's where
MultiFile comes in.
MultiFile is the file manipulator. MultiFile can copy, delete and
move directories and files with the same restrictive capabilities as
ListFiles (sans size).
MultiFile is cautious because it warns you if you are going to
delete any data; yet it's understanding because you can force
operations and eliminate the warnings.
MultiFile is safer than COMMAND.COM; MultiFile will not destroy an
existing target file if there isn't enough room on disk for its
replacement.
TIPS:
Define the following commands:
C>ALIAS copy MF /C
C>ALIAS del MF /D
C>ALIAS ren MF /M
These will work just as you expect but will have expanded WildCard
capabilities, more selection criteria, prompting support, forced
operations, warnings, smarter copying, and more.
Define a command to remove an entire directory branch:
C>ALIAS prune MF /D /R
CAUTION:
The PRUNE command as described above will remove the specified
directory even if there are files or sub-directories within it.
This command is very powerful and must be used with caution.
When you have one of those files with odd characters (like spaces)
in the filename then quote the filename. When the filename is
quoted, MultiFile will treat it just the way you type it. You can
use ALT-<numpad> to enter really weird characters; however, some
DOS-Editors disable this capability.
Example:
C>MF /D /A "ea data. sf"
This will delete that file, even with the spaces in the name.
You may have this file on your disk, so don't play with this
command.
Usage:
MF [options] [SmartPath]WildSpec [SmartPath][WildSpec]
-64- Obs Toolkit 1.5 MultiFile
Options:
/! - Test drive
Usage: MF /[-]!
This option causes MultiFile to report its actions without
actually performing them.
This option allows you to verify MultiFiles actions.
/A - Attribute selection criteria
Usage: MF /A[[:]{ [+|-|*] R|A|S|H }]
This allows control over the selection of files based on a file's
attributes. There are four (4) kinds of attributes that MultiFile
recognizes;
The attributes are maintained by DOS and are:
(A) ARCHIVE; (S) SYSTEM; (R) READ-ONLY; (H) HIDDEN
MultiFile does not support the usage of the DIRECTORY attribute.
Option Qualifiers (when absent, defaults to /A+S+H include SYSTEM
and HIDDEN files)
A - Archive
S - System
R - Read-Only
H - Hidden
Option Sub-qualifiers (when absent, defaults to '*')
* - File requires this attribute. Only files that possess the
specified attribute are selected.
+ - Include files with this attribute (default). This is to
collect System and Hidden files. This option qualifier has no
effect on Archive and Read-Only attributes.
- - File may not possess this attribute. Only files that DO NOT
possess the specified attribute are selected.
Example:
/A - All files, including SYSTEM and HIDDEN.
/A+s+h - Include SYSTEM and HIDDEN files. This is the default and
can be abbreviated to just /A.
/Ash - Only files that have both SYSTEM and HIDDEN attributes.
/A-r - Exclude files that are READ-ONLY.
/A*a - Select ARCHIVE files only.
-65- Obs Toolkit 1.5 MultiFile
/C - Copy files
This option directs MultiFile to perform a copy operation. The
source can be a filename, a directory name, or a WildSpec.
Default operation for copy is to Add/Replace files, but to warn
about impending overwrite conditions.
If a WildSpec is selected for the destination, then the files
will be renamed during the copy.
Option Qualifiers:
Usage: MF /C{ U|R|A } WildSpec [WildSpec]
When no option qualifiers are selected, the default action is
to copy all selected files.
When the target WildSpec is omitted, the source files will be
copied into the current directory.
U - UPDATE files
Copy the files that exist in the target directory, but have a
more recent time stamp in the source directory.
Note: Be sure that your clock keeps correct time.
R - REPLACE existing files
These are files that exist in the target directory and the
source directory. This option causes MultiFile to replace
every file in the target with the file from the source.
A - ADD new files
Add to the target directory, the files that exist in the
source, but are not in the target.
This command goes well with /CopyUpdate. Together, they
update a target directory to the same contents as the source.
NOTE:
The target will retain existing files that are no longer
present in the source directory.
TIP:
To get COPY to work somewhat like DOS, define it to be:
C>ALIAS copy MF /CAR
Note:
Each set of COPY options completely replaces the previous
copy selection on the line. In other words, only the last
selection is used.
MF /CU /CA /CAR /CR /CA source target
this will only add files to the target directory.
-66- Obs Toolkit 1.5 MultiFile
/D - Delete files
Usage: MF /D WildSpec
This option directs MultiFile to delete a file, a group of files,
or even a directory (empty or not). Delete commands require
confirmation unless the Force option is selected.
TIP:
Use MultiFile's PROMPT option to selectively confirm the delete
operation for each file.
Examples:
C>MF /D filename.ext
This would delete FILENAME.EXT in the current directory.
C>MF /D /R \*.bak
This would delete all .BAK files in all directories on the
default disk.
This option comes with a confirmation warning.
C>MF /D /R dirname
This would delete all files, sub-directories, and eventually
the directory itself.
This option comes with a confirmation warning.
/H - Hoist files to the target directory (flatten tree)
Usage: MF /[-]H
Normally MultiFile will preserve the tree structure to the target
whenever it does a recursive copy or move operation.
Sometimes it may be desired to collect files in a tree into a
single directory, or it may be necessary to flatten a tree. This
option instructs MultiFile to do just that.
Note:
When a tree is flattened to a single directory, and there are
two files with identical names in the tree, MultiFile will
only bring the most recent file to the target.
/I - Ignore overwrites by skipping file
Usage: MF /[-]I
This option instructs MultiFile to skip files which would
overwrite themselves. When MultiFile is copying or moving files,
and the target is the source, MultiFile will skip the file
without notification.
/F - Force operations
Usage: MF /[-]F
-67- Obs Toolkit 1.5 MultiFile
MultiFile tries to warn you before a file is overwritten, or a
read-only file is deleted. The Force option eliminates the
warning message and proceeds as if the warning was issued and
you gave MultiFile a YES.
The specific operation of the Force option is:
COPY: Files (existing and Read-Only) are overwritten without
warning.
Directory is created without warning.
DELETE:
FILE: Files are deleted without warning.
Forces deletion of read-only files.
DIR: Directory is deleted without warning.
MOVE: Files (existing and Read-Only) are overwritten without
warning.
Directory is created without warning.
When copying, deleting, or moving files, Force stops the message
that says the file is Read-Only.
CAUTION:
Use of the Force option is just like answering YES to all
cautions and warnings.
/N - Copy only new files
Usage: MF /[-]N
This option is permitted during a copy operation (/Cx) only. This
option can be combined with any of the copy operations (Update
(/CU), Replace (/CR), etc...).
Only files with the ARCHIVE attribute will be selected.
The ARCHIVE attribute will be cleared on each source file after
it has been successfully copied.
/M - Move (rename) files
Usage: MF /M WildSpec [WildSpec]
This option directs MultiFile to Move a file, a directory, or a
group of files to a new destination. If the target is on the same
drive, then an optimum rename strategy is applied. If the target
is a different drive, then the files are copied, and deleted.
If the target WildSpec is omitted, then the source files will be
moved to the current directory.
To rename a file into a directory, then append a backslash to the
end of the target directory name.
MF /M filename.exe d:\dirname\
-68- Obs Toolkit 1.5 MultiFile
/P - Prompt at each file
Usage: MF /[-]P
When the Prompt option is invoked, MultiFile will seek
confirmation for its operation for each file. This provides the
finest resolution of file selection available.
This option causes each filename to be presented to the user for
confirmation.
This option is inhibited for individual files.
The applicable responses to a Prompt are (Y/N/A/Q):
(Y)es - YES, perform operation on the indicated file.
(N)o - NO, skip this file.
(A)ll - YES, perform operation on this and all remaining
files. Unless Force is enabled, you will be
prompted for confirmation.
(Q)uit - NO, skip this and all remaining files.
This option will suppress redundant warning messages by combining
them in the Prompt.
When Prompting, the files are presented to you in alphabetical
order.
/Q - Quiet operation
Usage: MF /[-]Q
This option shuts off the in-progress messages that scroll up the
screen (the filenames already acted upon).
/R - Recurse subdirectories
Usage: MF /[-]R
This option indicates that all sub-directories, subordinate to
the base specified (or implied), shall also be searched for
files.
/S - Set file characteristics
Usage: MF /SA{ [+|-]R|A|S|H } WildSpec |
MF /ST"date time" WildSpec
This option directs MultiFile to alter the directory entry of the
specified files. The Set command can change file attributes
and/or the date and time stamp of the file.
-69- Obs Toolkit 1.5 MultiFile
Option Qualifiers
A - Set file ATTRIBUTES
A - Archive
H - Hidden
R - Read-Only
S - System
Note:
If an attribute is not specified it will not be altered.
Option sub-qualifiers:
+ - Add attribute (default)
- - Remove attribute
T - set file TIME and Date
"date time" - date & time to set files to.
Examples:
C>MF /SA+R c:\autoexec.bat
Set the read-only attribute on the file AUTOEXEC.BAT in the
root directory of the C: drive.
C>MF /ST "1-10-92 1:50" \obskit\*.*
Set the date and time of all files in the OBSKIT directory
to be January 10, 1992, and mark the version to 1.5. Many
developers embed the version in the files time stamp.
/T - Time restrictions
Usage: MF { /TB|/TE|/TS "date time" }
This restriction excludes files which don't make the date/time
requirement.
Time requirements can select files which are equal to the
specified Date/Time (exact), written sooner than (before),
written after (since), or somewhere between two times.
Option Qualifiers:
B - Before
E - Exact
S - Since
Option sub-qualifiers:
"date time" - a date/time pair must be quoted
Example:
/TB 1-1-90 - all the files written before 1990
/TS-0 - all the files written today
/TE "-1 ." - all the files written in the last 24 hours.
MultiFile will warn you if no files are excluded.
-70- Obs Toolkit 1.5 MultiFile
/V - Verify writes
Usage: MF /[-]V
This option directs MultiFile to set the DOS verify flag. The
flag is reset to the default when the write operations are
complete.
/X - Exclude WildSpec
Usage: MF /-X | { /X WildSpec }
This option allows you to exclude files. Up to 16 exclude
WildSpecs may be supplied. You can clear the list of excludes by
issuing /-X.
MultiFile will warn you if no files are excluded.
/Y - Yes to cautions
Usage: MF /[-]Y
This option answers yes to the caution prompts. The option is not
as inclusive as Force.
The specific operation of Yes is to:
COPY:
Confirm creation of a directory if necessary
Confirm file overwrite (not for READ-ONLY files)
MOVE:
Confirm creation of a directory if necessary
Confirm file overwrite (not for READ-ONLY files)
DELETE:
No operation.
MODIFY:
No operation.
TIPS:
Define an UPDATE command to replace the contents of the target
directory, with the newer files in the source directory.
C>ALIAS update MF /CU .
Define a copy that doesn't perform any unnecessary work
C>ALIAS qcopy MF /CUA
This QCOPY will only update files in, and add files to the target
directory. This is what you normally want to happen anyway.
Define a TOUCH command to update files to the current date and time.
C>ALIAS touch MF /ST.
-71- Obs Toolkit 1.5 MultiFile
Examples:
C>MF /D *89.bck
Delete all the .BCK files in the current directory that end in 89.
C>MF /C /X*.bak /X*.obj /X*.tmp . f:\backup
Create a BACKUP directory on the F: drive, and place into it, all
the files in the current directory that aren't .BAK, .OBJ, or
.TMP.
C>MF /CU . f:\backup
Update the F:\BACKUP directory with the files of later timestamp
in the current directory.
C>MF /CUA . f:\backup
Update the F:\BACKUP directory with the updated and new files in
the current directory. (Note if you are following the above
examples, then this command would add to the F:\BACKUP directory
all the .BAK, .OBJ, and .TMP files that were excluded earlier).
C>MF /C /H /TE-0 /R \ a:\
Copy all the files on the current drive, that were written today,
onto the A: drive. Flatten the tree into a single directory.
C>MF /D f:\backup\*.bak
Delete the .BAK files in the F:\BACKUP directory.
C>MF /D /R dirname
Remove the directory DIRNAME and delete all of its' contents. This
command will require confirmation.
C>MF /D /R c:\*.bak
Delete all .BAK files on the C: drive. This command will require
confirmation.
C>MF /D /R /F c:\*.bak
Delete all .BAK files on the C: drive, but do not ask for
confirmation before proceeding with the operation.
C>MF /D /R /P c:\*.bak
Delete all .BAK files on the C: drive, but ask the user before
each file as to whether the file should be deleted or not.
C>MF /M /R . a:\
Move the current directory (Tree intact) to the A: drive.
Note:
Currently the files must fit on the target drive or an error
indicating Insufficient Disk Space will be issued. The files
reported as moved, were in fact moved.
-72- Obs Toolkit 1.5 MultiFile
C>MF /M /R /I /H *.tmp .
Move all the .TMP files beyond the current directory into the
current directory and hoist them to parent level. Since the /I
option was invoked, MultiFile will skip any .TMP files that are
already in the current directory.
DOS operational differences:
MultiFile /Copy cannot be used to catenate files via wildcards.
MultiFile will instead ask if the directory should be created. DOS
would catenate all files into a single file.
MultiFile /Copy does not support the "+" (catenation) operator when
copying files.
MultiFile /Copy does not support the /Ascii and /Binary
qualifiers. Files are always copied as BINARY, and are identical to
the source.
MultiFile /Copy reports the filename after its is copied. In the
event that there is insufficient disk space available on the target
drive, then the filename is the file that was not copied.
MultiFile generates an "Invalid filename" when the colon is used as
a delimiter.
-73- Obs Toolkit 1.5 ObsCD
ObsCD (OCD)
-----------
Description:
ObsCD (OCD) is a utility that allows you to move between directories
with ease. CD was O.K. when a disk was only 5 meg, but now you
probably have more than 100 meg of finely structured directories.
Using a computer is hard enough, (really its easy), without having
to remember exactly where you put everything.
ObsCD maintains a HotDir file of directories on your disk(s) so that
you can go there with one simple command.
ObsCD uses sophisticated pattern matching logic, so that it tries
very hard to figure out which directory you want to change to.
ObsCD can Push and Pop directories. (A directory stack must be
installed for these operations.)
ObsCD limits its assumptions about how you want it to operate so
there are options to configure its operation.
Usage:
OCD [options] [SmartPath][directory]
If the directory name is preceded by an asterisk '*' (e.g.,
*STRING), then a substring match will be performed. Any directory
that contains the string which follows the asterisk will be
selected. You can reissue the same command to go from the current
directory to the next matching directory.
If the directory name contains any question marks '?' (e.g.
budget??), then only directory names that match the verbatim text
exactly, and have place holders for the '?'s will be selected. Once
again, you can reissue the same command to go from the current
directory, to the next matching directory.
You can select a fixed path by specifying the directory name like
the following (CPROGS\LF). This will cause a fuzzy match on "CPROGS"
but requires an absolute match on "LF". The concept can be extended
further to include matches such as (TURBO\TC\CPROGS), will select
that CPROGS directory over any other CPROGS directories. NOTE: The
primary directory (e.g., CPROGS in the first example, and TURBO in
the second) must be located in the HotDir file. If the directory is
not in the HotDir file, or was excluded, then OCD will not be able
to locate the directory.
Options:
/Basedisk - Drive letter of lowest hard drive in system
Usage: OCD /BASEDISK drive
-74- Obs Toolkit 1.5 ObsCD
This option informs OCD that this system is not configured with
the lowest hard drive as drive C:. The basedisk defaults to C:
Use this option to inform OCD that the system has more than two
floppies, or that the hard disk is drive B:
/[NO]Change - Change to dir (default /NOCHANGE)
Usage: OCD /MKDIR /CHANGE newdir
This option directs OCD to change to the newly created directory.
It is still necessary to use /DISK if you want the current
location moved there across disks; otherwise, the current
directory for the specified disk will be changed. Requires
(/MKDIR) to create the directory.
/[NO]DIsk - Allow a change of drives (default /NODISK)
This option permits OCD to change disks when trying to satisfy
your request for a directory. If this option is absent, OCD will
not leave the current disk.
/DRives - Use these drives during the /READ operation
Usage: OCD /DRIVES drives [/READ | /LIST]
The next parameter, after the option DRIVES, must be a collection
of drive letters (e.g. ABCDEFG).
Used with the READ command, /DRIVES restricts the drives that
OCD will use during the read operation. This option is good for
eliminating shadow disks, RAM disks, and network disks.
Used with the LIST command, /DRIVES will only list the current
working directory on the drives that you specify. This is good to
eliminate disks which are only sometimes there.
Note: This option will override the LAST drive.
/[NO]ECho - Report the directory changed to (default /NOECHO)
This will, upon every location change, echo to the console the
directory that was selected, and changed to.
TIP:
Use OCD /ECHO if you don't keep your current working directory
in your PROMPT. This option will enable you to determine your
current location after the move without asking.
/[NO]Force - Force the directory push (default /NOPUSH)
This option will cause the PUSH to place the current directory
onto the DirStack even if it would duplicate the top most entry.
This option is useful in batch files, to ensure that you return
the user to their originating position.
This option requires PUSH.
-75- Obs Toolkit 1.5 ObsCD
TIP:
When changing directories within batch files, be sure to
restore the users original environment. ObsCD can help. Use
the following procedure (a minimum DirStack of size 2 is
required):
OCD /PUSH /FORCE
drive:
OCD /PUSH /FORCE \directory
REM invoke program
OCD /POP
OCD /POP
/LAst - Do not consider drives beyond during the /READ operation
Usage: OCD /LAST drive [/LIST | /READ]
The next parameter, after LAST, must be a drive ID (e.g., F:).
The colon is optional.
Used with the READ command, this option causes all drives beyond
the stated LAST drive to be ignored during the READ operation.
Used with the LIST command, this option causes only the disks up
to and including the LAST drive to have there current working
directory reported.
This is good for eliminating RAM disks, and SUBSTituted drives.
/LIst - Report the directory stack and default directories
This command allows you to List the DirStack. The entries will be
numbered from top of stack (1:) to the bottom of stack (4:).
These are the locations that you can POP to.
In addition, this command also reports the current default
directory for each hard-drive on your system. These directories
can be used by all DOS software and most third party software
(Obs Toolkit included) simply by specifying the Drive name (e.g.
C:).
Note:
If the PUSH option is combined with LIST command then the
PUSH will be ignored. Otherwise, the stack may have been
modified when you requested a listing.
/MKdir (MD) - Make directory
Usage: OCD /MKDIR newdir
This command allows you to make a new directory and update the
HotDir file at the same time. If you want to change to the newly
created directory use the CHANGE option also.
/POp [n] - Return to a previously pushed directory.
This command moves you to the 'n'th location on the stack.
A DirStack must be installed for this option to be available.
-76- Obs Toolkit 1.5 ObsCD
Note:
If the pop operation exceeds the stack depth, then a warning
message will be displayed and no operation will occur.
/[NO]PUsh - Push location onto stack (default /NOPUSH)
Place the current disk and directory (location) onto the
DirStack. If the current directory is already at the top of the
DirStack, then it is not pushed. This is to conserve the precious
DirStack space. Use FORCE to duplicate the DirStack top.
If a directory is supplied, then push the current directory and
change to the new directory.
Note:
If the PUSH option is combined with LIST then the PUSH will be
ignored.
The default DirStack is four (4) locations deep, but this can
be specified when installing ObsRes.
Whenever the stack overflows on a push, then the bottom of the
stack (oldest entry) will be pushed off without warning.
/REad - Read the HotDir file
OCD uses a Hot Directory file, which it places on your basedisk
drive. Refer to BASEDISK for information on the basedisk. Floppy
disks are supported by HotDirs always.
This command creates the Hot Directory file on the lowest
addressable hard drive (usually C:). The filename is OBSCD.NDX.
You cannot issue a READ command on a drive less that the
BASEDISK.
In order to quickly determine which directory you want to go to,
this file is consulted. OCD will function without this file, but
Hot Directories will not be supported.
This command may take a short while.
This file must be explicitly created.
/RMdir (RD) - Remove directory
Usage: OCD /RMDIR emptydir
This command instructs OCD to remove a directory and eliminate it
from the HotDir file.
/[NO]SCan - Scan disk for directory (default /NOSCAN)
This option allows HotDir capability on a disk/directory that was
previously eXcluded. The information is not stored in the HotDir
file.
-77- Obs Toolkit 1.5 ObsCD
/STack - Place the specified directory onto the stack
This command allows you to place the specified directory onto the
DirStack without changing into it. Nothing else is disturbed.
Use the DISK option to stack a directory from another disk.
Use the ECHO option to report the directory stacked.
/UP [n] - Move UP the path
This command moves you up 'n' sub-directories from the current
path.
/[NO]UPDate - OK to update the HotDir file (default /UPDATE)
This option maintains the HotDir file on the fly, without
performing a READ operation. Use of this option is must faster
than re-reading the entire directory structure.
When changing to a directory that was deleted, this option
removes the deleted directory from the HotDir file.
When changing from a directory that does not exist in the HotDir
file, this option adds the current directory, and its parents if
necessary, to the HotDir file.
This option is provided so that you can easily update the HotDir
file after using a third party software installation, that
created its own directories, or after a cleanup that moved or
deleted directories.
TIP:
If you allow OCD to UPDATE the HotDir file will remain fairly
much up-to-date, without ever having to resort to a READ
operation.
/eXclude - Exclude directory from the HotDir file
Usage: OCD /READ { /EXCLUDE dirname }
This READ option permits disk branches to be eliminated from the
HotDir file. Once a branch has been eliminated, it will not be
updated. Up to 8 excluded branches may be specified.
This option requires the READ command.
Note:
To add the branch back into the HotDir file a READ operation
must be performed.
TIPS:
If you use a basedisk other that C:, then use recursive aliases and
define OCD to be OCD /BASEDISK ?: where ? is your lowest addressable
hard drive (e.g., ALIAS ocd OCD /BASEDISK D:). This will ensure that
OCD always uses the correct basedisk.
-78- Obs Toolkit 1.5 ObsCD
Define the following commands:
C>ALIAS cd OCD /PUSH
This will operate like DOS's CD, but will stack Hot Directories
and enable returns.
C>ALIAS cdd OCD /DISK /PUSH
This will allow you to change directories and disks with CDD.
C>ALIAS sw OCD /PUSH /POP
This will allow you to switch between the current directory and
the directory on the top of the DirStack.
C>ALIAS md OCD /MKDIR
C>ALIAS rd OCD /RMDIR
These commands will update the HotDir file whenever you create
or remove a directory.
C>ALIAS pop OCD /POP
This will allow you to move back to a previous location.
C>ALIAS up OCD /PUSH /UP
This will allow you to move up the directory branch.
C>ALIAS list OCD /LIST
This will allow you to list the current DirStack, and default
directories.
When using the directory stack with MultiFile and ListFiles,
you can easily determine which SmartPath that you want to
reference.
Use recursive aliases, and define OCD to be OCD /UPDATE. This will
enable ObsCD to update the HotDir file whenever it detects that a
new directory was created, or an existing directory was deleted.
Use a prompt that contains the directory pathname, or direct OCD to
echo (OCD /ECHO) its actions. If you don't you may not know where
you are.
C>prompt $p$g - The prompt will tell you where you are at all
times.
Examples:
C>OCD
This will report the current directory.
C>OCD f:\util
This will change the current directory on the F: drive to the
\UTIL directory, but leave you at the same place.
C>OCD /PUSH /DISK f:\util
This will change to the util directory on the F: drive.
-79- Obs Toolkit 1.5 ObsCD
C>OCD /POP
This will return you to the previous pushed directory.
C>OCD /PUSH /POP
This will save the current location on the stack and move you to
the current stack top. This allows you to switch back and forth
between two directories.
C>OCD d:
This will report the current directory on the D: drive.
C>OCD /DISK 3:
This will change to the directory which is 3 on the DirStack.
C>OCD /READ /LAST e:
This will read a new HotDir file for drives CDE if present. If
drives are present above E:, then they will be ignored.
C>OCD /READ /DRIVES cf /EXCLUDE c:\ignore
This will read a new HotDir file for drives C and F only. The
branch C:\IGNORE will be completely ignored.
C>OCD /MKDIR /CHANGE newdir
This instructs OCD to create the directory NEWDIR and then set it
to be the default dir. If the directory was created on a different
drive, then the default directory for that drive will be changed.
If the DISK option was also specified, then the current working
disk and directory would be changed.
C>OCD /UP 2
If the current path is C:\root\sub1\sub2\sub3 this command would
move you to C:\root\sub1.
C>OCD /STACK /DISK /ECHO util
Place UTIL onto the DirStack. Get the UTIL from the best matching
drive and echo to the console the name of the disk:\directory that
was placed onto the stack.
Notes:
When you specify a disk and Hot Directory, OCD will select the best
matching directory on the specified disk.
Absolute & relative path names are supported at all times.
The DirStack depth can be set when ObsRes or DirStack is installed.
Hot Directory searches always start from the current location. This
means that if there are two (2) or more directories with the same
match weight, then you can re-execute the same command to move along
to the next directory.
-80- Obs Toolkit 1.5 Appendix A: Quick Reference
------------------------------------------------------------------------
Alias
------------------------------------------------------------------------
Usage:
alias [/[NO]Page] [name] - Report synonym(s) (wildspecs supported)
alias [/NOSpace] name cmd - Define synonym (abbreviate using "'")
alias /NUll name - Define null synonym
alias /Make name - Define a path alias
alias /EDit name - Edit alias definition
alias /CLear - Remove ALL synonyms
alias /Delete name - Remove synonym
alias /File file.ext - Read alias commands from file.ext
alias [options] - (configures/info on the translator; may be combined)
/[NO]CAse - Case sensitive aliases
/[NO]ECho - Echo translations
/[NO]Recurse - Recursively apply aliases
/OFf - Turn translator Off
/ON - Turn translator On
/STatus - Report active conditions
/SKipchar x - Define character to skip translation
------------------------------------------------------------------------
DirSize
------------------------------------------------------------------------
Usage: DS [options] [path]
Options are:
/BYDAte - Sort tree in date order
/BYDOs * No tree sort
/BYName - Sort tree in alphabetical order
/BYSize - Sort tree from smallest to largest
/DEpth num - Draw tree to depth 'num'
/[NO]Count - Continue to count files
/[NO]DAte - Display creation date
/[NO]Page - Page output
/[NO]Size + Display sizes
-81- Obs Toolkit 1.5 Appendix A: Quick Reference
------------------------------------------------------------------------
EnvEdit
------------------------------------------------------------------------
Usage: EE [options] [variable[=[definition]]]
Options are:
/CUrrent - Use the Current environment
/DOs * Use the active DOS environment
/MASter - Use the Master environment (aka /ROot)
/Parent - Use the Parent environment
/[NO]CAse - Name is case sensitive
/[NO]Edit - Permits usage of the line editor
/[NO]STatus - Report status on the environment
/[NO]REMove + Remove variable on "VAR="
/[NO]Quiet - No display output
/Append - Append "text" to end of definition
/INSert - Insert "text" to beginning of definition
/REPlace - Replace "text_1" with "text_2" in definition
/COpy - Duplicate environment variable
/DELete - Delete environment variable
/MAKe - Define a variable to be the current directory
/REName - Rename environment variable
/INCrement - Add one to the variable
/DECrement - Subtract one from the variable
/Upper - Change definition to all upper case
/LOWer - Change definition to all lower case
/CLear - Clear the environment
/LOAd - Load DOS environment from file
/SAve - Store environment into file
-82- Obs Toolkit 1.5 Appendix A: Quick Reference
------------------------------------------------------------------------
FileDump
------------------------------------------------------------------------
Usage: FD [options] {[SmartPath][directory]WildSpec}
Options are:
/Ascii - Ascii output
/COUnt - Count chars, words, lines, and pages
/Hex - Hex output
/TExt * Text output
/STrings # - String output (# is minimum string length)
/BInary - Force input to be binary
/BEgin #[x] - Start offset
/End #[x] - End offset
/TAb # - Set tab setting (normally 8)
/7 - Strip high bit
/8 * Do not strip high bit
/[NO]COMpress - Compress runs
/[NO]NUmber - Number lines (/TEXT only)
/[NO]Page - Page output
/[NO]SMart - Smart type logic
/[NO]Wrap + Wrap long lines
------------------------------------------------------------------------
ListFiles
------------------------------------------------------------------------
Usage: LF [options] [SmartPath][directory]{WildSpec}
Options are: (/-x for B C G L O P R W X)
1 - 12 hour clock; 2 - 24 hour clock
Ax - Attribute
A - Archive, H - Hidden, R - Read-only, S - System, D - Directory
+ - include, - - exclude, * - required
Bx - Brief output (B+ for full pathnames)
Cx - Command listing (B - Beginning, E - End, T - Text)
Dx - Detect special conditions
C - duplicate Contents D - Duplicate entry,
H - Hidden programs O - Old files
G - report Grand total information only
L - Lower case
Ox - Order by (-x to reverse)
U - Unsorted, E - by Extension, N - by Name, G - Group directories
S - by Size, D - by Date/time, R - Reverse output
P - Page output
R - Recurse Sub-directories
Sx - Size restriction (L - Less-than, E - Equal, G - Greater than)
Tx - Time restriction (B - Before, E - Exact, S - Since)
Wx - Wide output (x is number of columns (1-5))
Xx - Exclude WildSpec (may be repeated)
-83- Obs Toolkit 1.5 Appendix A: Quick Reference
------------------------------------------------------------------------
Locate
------------------------------------------------------------------------
Usage: LOCATE [options] {disk} [name]
Options are:
/COmmand * Search for a command
/FIle - Search for a file
/[NO]All - Include system and hidden files (/File only)
/[NO]CHange - Change to directory where /COMMAND was found
/[NO]FUll - Display all file information for commands
/[NO]Page - Page output
/[NO]Wide - Wide output
------------------------------------------------------------------------
MultiFile
------------------------------------------------------------------------
Usage: MF [options] [SmartPath]WildSpec [SmartPath][filespec]
Options are: (-x cancels ! H I F P N Q R V X Y)
C - Copy all files CU - Update existing files
CR - Replace existing files CA - Add new files
CAR - Add & Replace (like DOS) CUA - Update & Add
D - Delete M - Move/Rename
SAx - Set Attributes STx - Set file date & Time
Ax - Attribute selection
A - archive, H - hidden, R - read-only, S - system
+ - include, - - exclude, * - required
I - Ignore overwrites by skipping file
N - Select archive files, reset after copy (copy only)
Tx - Time restrictions (B - Before, E - Exact, S - Since)
Xx - Exclude WildSpec (may be repeated)
! - Test run, perform no actions H - Hoist to target / flatten tree
F - Force all operations P - Prompt at each file
Q - Quiet operations R - Recurse Sub-directories
V - Verify writes Y - Yes to cautions
-84- Obs Toolkit 1.5 Appendix A: Quick Reference
------------------------------------------------------------------------
ObsCD
------------------------------------------------------------------------
Usage: OCD [options] [SmartPath][dirname]
Options are:
/LIst - List the DirStack and default dirs
/MKdir - Make directory (MD)
/POp [n] - Restores a pushed location (default=1)
/REad - Read a new HotDir file
/RMdir - Remove directory (RD)
/STack - Put the specified directory on the DirStack
/UP [n] - Moves up 'n' directories (default=1)
/DRives - Drives to /READ or /LIST
/LAst - Last drive to scan during /READ or /LIST
/eXclude - Exclude directory from /READ
/Basedisk - Lowest hard drive letter (default 'C:')
/[NO]Change - Change into directory during /MKDIR
/[NO]DIsk - Allows disk changes
/[NO]ECho - Reports directory changed to
/[NO]Force - Force push (no duplicate check)
/[NO]PUsh - Saves current location to the DirStack
/[NO]SCan - Force scan for directory change
/[NO]UPDate + OK to update the HotDir file
-85- Obs Toolkit 1.5 Appendix A: Quick Reference
WildSpecs
---------
? - matches any single character (a character is required)
* - matches any group of characters (zero or more characters may match)
SmartPaths
----------
OCD /LIST (Reports contents of DirStack)
SmartPaths work just like regular drives. You can also OCD /POP back.
You cannot reference the root of a SmartPath.
Date and Time
-------------
"Date Time" (Quotes required to supply both Date & Time)
date = mm-dd-yy - the full date must be specified
date = -days - that many days in the past
time = hh:mm:ss - the minutes & seconds are optional
time = . - this translates to the current time
Quoting Strings
---------------
To insert a quote into a quoted string, prepend with a single backslash
Line Editor
-----------
Up Arrow Move one line up (multiple line display only)
Down Arrow Move one line down (multiple line display only)
Left Arrow Move one character to the left
Right Arrow Move one character to the right
CTRL-Left Move one word to the left
CTRL-Right Move one word to the right
INSERT Toggle Insert/Overstrike mode
HOME (^A) Move to the beginning of the edit field
END (^E) Move to the end of the edit field
DELETE (^D) Delete the current character
BACKSPACE Delete the previous character
CTRL-Y Delete the entire line
RETURN (ALT-X) Store changes and exit
ESCAPE Abort changes and exit
Error Levels
------------
0 - NO ERROR - No error encountered
1 - NOT FOUND - File or object was "NOT FOUND"
2 - ABORTED - The user chose to "ABORT" the operation
3 - OPERATION FAILED - The requested "OPERATION FAILED"
4 - LIMIT EXCEEDED - The operation exceeded the tools "LIMIT"
5 - USAGE ERROR - The tool displayed a "USAGE" error
6 - INSTALL FAILED - The tool was unable to "INSTALL"
-86- Obs Toolkit 1.5 Appendix B: Bug Report
If you think that you have found a bug, then please do the following:
Read the documentation carefully, see if it is a misunderstanding.
If it isn't a misunderstanding, it must be a bug!
Date? __/__/__ Name? _______________________ Phone? (___) ___-____
Are you registered? Yes / No
Describe the problem?
Classify the problem? Minor Inconvenient Destructive
Can you reproduce the problem? Yes / No
Describe your environment? _____________________________________________
________________________________________________________________________
________________________________________________________________________
Which tool? ____________________________________________________________
Exact syntax of the command?____________________________________________
What did you expect to happen? _________________________________________
________________________________________________________________________
________________________________________________________________________
What, in fact, happened? _______________________________________________
________________________________________________________________________
________________________________________________________________________
Additional comments? ___________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
-87- Obs Toolkit 1.5 Appendix C: Survey Form
Mail to:
Contrails, Inc.
P.O. Box 2759
Lompoc, CA 93438-2759
Please take the time to tell us what you think. Your feedback will help
us to develop better products and marketing techniques.
How did you learn about Obs Toolkit? ____________________________________
Where did you get this copy? ____________________________________
When did you start your evaluation? __/__/__ (Be honest)
Are you going to/did you register? Yes / No
Will you share it with a friend? Yes / No
How does Obs Toolkit rate?
Quality Poor Needs-Improvement Good Excellent
Reliability Poor Needs-Improvement Good Excellent
Ease of use Poor Needs-Improvement Good Excellent
Features Poor Needs-Improvement Good Excellent
Expandability Poor Needs-Improvement Good Excellent
Documentation Poor Needs-Improvement Good Excellent
What other tools do you use on a regular basis? ________________________
_______________________ ________________________ ________________________
_______________________ ________________________ ________________________
_______________________ ________________________ ________________________
What can we do to improve Obs Toolkit? __________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
What impressed you the most? ____________________________________________
_________________________________________________________________________
_________________________________________________________________________
-88- Obs Toolkit 1.5 Appendix D: Registration Form
Make checks payable to:
Contrails, Inc.
P.O. Box 2759
Lompoc, CA 93438-2759
(805) 733-2808
Custom agreements (for orders over 100) are also available.
Number of copies (one disk supplied) Count $/Copy Total
1 ............................................... 39.00 $ _______
2 to 9 ............................. _____ @ 28.00 $ _______
10 to 24 ............................. _____ @ 24.00 $ _______
25 to 49 ............................. _____ @ 21.00 $ _______
50 to 100 ............................. _____ @ 19.00 $ _______
Additional manuals (order includes 1).. _____ @ 6.00 $ _______
Sub-Total $ _______
California residents, please include 7.75% sales tax $ _______
Shipping and handling ($4.00 + $1.00 per additional manual) $ _______
Total $ _______
Date of order: __/__/__ Payment by: ( ) Check ( ) Money Order
Disk size: ( ) 5 1/4 inch ( ) 3 1/2 inch
Register to:
Name: _____________________________________ Phone: (___) ___-____
Company: _____________________________________ Fax: (___) ___-____
Address: ___________________________________________________________
___________________________________________________________
State: __ Zip Code: ______-____
Please allow 2-3 weeks for delivery.
-89-